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

Ok, getting closer:

<?php
$excludecatss = get_exclude_categories_loop();
print_r ($excludecatss);
?>

returns 42,4,46

That is absolutely correct.

I’m guessing it must have something to do with:

<?php
query_posts( array( 'category__not_in' => get_exclude_categories_loop() ) ); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

I’m so close that I can taste it lol.. man what a day…

I can’t seem to locate any documentation in the codex about passing a function name to the category__not_in argument, so I’m not sure where to go from there.

Skip to toolbar