Excluded category shoes up on front page if post is made sticky- how to stop?
-
Im using a modifies twentyteleve template. I want that on the home page that posts from a few categories should not show up. So I used the following coding, which works. But when a post is made a sticky, it shows up even if on the excluded category.
<div id="primary" class="site-content"> <div id="content" role="main"> <?php global $paged; $pageId = get_the_ID(); $qargs=array( 'post_type'=>'post', 'order' => DESC, 'category__not_in' => array(10,17), 'paged' => $paged ); query_posts($qargs); ?> <?php if ( have_posts() ) : ?>
- The topic ‘Excluded category shoes up on front page if post is made sticky- how to stop?’ is closed to new replies.