This is the custom query I’m running to display post from 2 categories.
I have installed WordPress Plugin “Featured Post” but the featured post is not excluding from the displayed list.
<?php
$category_id = get_cat_ID($strReports || $strInsights);
$custom_query = new WP_Query( 'cat=' .$category_id. '&featured=no&posts_per_page=6&order=desc' );
while($custom_query->have_posts()) : $custom_query->the_post();
?>
HTML Content Here
<?php endwhile; ?>
<?php wp_reset_query(); // reset the query ?>
Looking through “Featured Post” you can see that it just test against yes value. What
feature=yes
does is just check a meta field, so I think you can do the reverse way to achieve what you want, like this:Hope it helps!
your’e running an invalid argument on get_cat_ID.
should be something like this:
create your custom query and add filter.