Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Need some ninja guru help on a function to exclude cats from loop


Anointed
Participant

@anointed

Thank you MrMaz

As it turns out I was being ‘mislead’ by the wp codex, and when you combine that with my limited knowledge of php, I was bound for problems.

The codex gives an example:

query_posts(array('category__not_in' => array(2,6)));

That lead me to believe that I needed to write my function to return a string of id’s separated by commas. Esp when I added in the numbers manually and it worked, that made it really confusing.

Once I removed those lines and made a small change to the homepage code, it worked perfectly.

Skip to toolbar