Support » Fixing WordPress » Excluding Particular Categories OR Tags from Home Page

  • Resolved Ramnath

    (@ramnath007)


    Hello,

    Sorry for my ignorance in this particular query I have been searching for.

    I am using Mystique theme by digitalnature and I want to exclude particular categories or tags from the home page. I read the solution given at http://codex.wordpress.org/Template_Tags/query_posts#Exclude_Categories_From_Your_Home_Page

    I tried the following in index.php located in ~/public_html/smilepls.com/wp-content/themes/mystique but in vein. The code I used is:

    if (have_posts()):
            while (have_posts()):
             if (is_home()): //added
              query_posts('cat=-3'); //added
             endif; //added
              the_post();
              mystique_post();
            endwhile;
    ...

    Can anyone pls shed some lights on this issue? (WP ver: 3.1.3)

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Ok I found the solution 🙂

    if (is_home()):
    	  query_posts('cat=-23');
           endif;
           if (have_posts()):
            while (have_posts()):
    	  the_post();
              mystique_post();
    	endwhile;
    ...
Viewing 1 replies (of 1 total)
  • The topic ‘Excluding Particular Categories OR Tags from Home Page’ is closed to new replies.