Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 95884

ghurty on "Excluded category shoes up on front page if post is made sticky- how to stop?"

$
0
0

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() ) : ?>

Viewing all articles
Browse latest Browse all 95884

Trending Articles