• I’m trying to filter out a category of post from my home page ( (id 6, my podcasts). I found some code that is supposed to work, but I have it in the wrong place because it has prevented the previous/next links from working properly (they keep loading the same initial page of posts). When I remove this code things work properly but that category of posts I don’t want displayed (of course) have returned. I am not dumb but am no coder (when say ut this in the loop, I don’t know what that means, for instance) Any help is greatly appreciated. Here’s the code I found, I put it in my child index.php

    <?php
    		if ( is_home() ) {
    		query_posts( 'cat=-6' );
    		}
    		?>

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mikieshow

    (@mikieshow)

    Sorry for the typos above. And here’s my url if needed
    http://blog.themikieshow.org

    The loop is this if ( have_posts() ) : while ( have_posts() ) : the_post();. Your code is correct, just make sure it is below that line. Read more about the loop here. If this still isn’t working, clear your browser history (cache and cookies especially).

    Also, when you are making modifications in theme files you should use a child theme otherwise your changes will be overwritten when you update the theme. Read about child themes here.

    Good luck!

    Thread Starter mikieshow

    (@mikieshow)

    Sadly, it didn’t work. I put it where you suggested but the site won’t load, it stalls loading 7 out of nine items or some such thing. I tried in a couple of lower locations but same thing. I’m at a loss and I realize you’re at wordcamp now (your site is cool). I’ll keep looking.

    Thread Starter mikieshow

    (@mikieshow)

    I found a plugin that will do it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filter category on home page in WPFolio’ is closed to new replies.