a minor technicality

neil dixon’s blog

RSS2.0 Feed

links for 2008-01-04

No Responses to “links for 2008-01-04”

  1. This is very handy. Just what I need at the moment for a section of the site I want to show up separately from the main SmallBizPod blog feed.

    Does this piece of code exclude the category from the RSS feed as well? Or is it just simply a way of making sure a category doesn’t get displayed on the homepage?

  2. neil says:

    Good question. This will only work for the actual home page as yu are editing the blog’s default home page file. I’ll do some digging on the excluding from the feed and post here is I find anything.

  3. neil says:

    There’s a tutorial for excluding category posts from your RSS feed here:
    http://zeo.unic.net.my/notes/exclude-category-in-wordpress/

    It means adding to (or creating) the functions.php file in your theme folder, then placing a filter into it. Seemed to work for me here, though watch out for changes appearing not to take immediate effect due to the feed being cached.

  4. Shaun says:

    Excellent post! This is exactly what I was looking for, also. I’m actually not going to implement it just yet, but I know there’ll come a time when I want to remove my more trashy blog entries from the homepage.

  5. mp3bag says:

    Thanks, tweaked my site :) Working flawlessly

  6. Emma says:

    How would I get the category that I exclude to show up on another page? I have a category that I only want to appear on a certain page, not the homepage. :-)

  7. neil says:

    @Emma: you would need to add code to determine whether the page being viewed was the home page or not. See the is_home() function call in the Wordpress codex for more info on how to execute code only on the home page.

  8. David says:

    Hey, this worked great.

    One little thing that happened to me, not sure exactly why it happened, but pagination stopped working. What appeared on the front page would be the same as page 2 and so on.

    I made a small change that seems to have fixed it.

    query_posts($query_string . “&cat-xxx”);

    I just changed your line of with query_posts to this and it worked. :)

© NeilDixon 2006-2009. All rights reserved. MyFreeCopyright.com Registered & Protected