Re: Need some ninja guru help on a function to exclude cats from loop
Well I have narrowed it down to my get_exclude_categories_loop function.
Here is my new homepage loop code from the codex:
<?php
query_posts(array('category__not_in' => array(get_exclude_categories_loop))); ?>
<?php if (have_posts()) : while (have_posts()) : the_post();
?>
If I replace get_exclude_categories_loop with numbers like 4,6,52 then it works properly.
This leads me to believe that my get_exclude_categories_loop function is not returning a list of numbers to insert.
Here is what I do know:
1. my database has the right information so the UI is working as expected
zoo_cat_box_4 true
zoo_cat_box_5 true
zoo_cat_box_6 false
2. Using the new query_posts statement above works when on the homepage using hardcoded cat id #s
3. Leads me to believe that my get_exclude_categories_loop function is not returning numbers
or
I can’t call get_exclude_categories_loop in the query_posts like I am trying to do….
Any ideas what to change to get this working?