+ Reply to Thread
Results 1 to 6 of 6

Thread: How to keep Wordpress feed from displaying a category

  1. Join Date
    Sep 2007
    Location
    Seabeck, WA
    Posts
    89

    How to keep Wordpress feed from displaying a category

    Does anyone know how to stop Wordpress from including a specific category in my feed? I'm still looking for a solution online, but I figured it wouldn't hurt ask ask seeing that we have several expert wordpress users and coders on the forum.
    On Financial Success - A Practical How To

  2. Join Date
    Sep 2007
    Location
    Seabeck, WA
    Posts
    89

    Solution found!

    Solution found...and it was as simple as it should be. I'm always surprised when the solution turns out to be simple, but not mentioned anywhere on the 'net...

    Anyways, here's an excellent post on making 'special, hidden categories.' I wish I had discovered this article a few weeks ago. It covers several issues/problems I've already dealt with.

    Here's the scoop:

    One way of accessing your site's RSS feed is:
    Code:
    http://YourDomain.com/wp-rss2.php
    All you have to do is append
    Code:
    ?cat=-3
    with "3" being the category id you want to exclude.

    So, it would look like this:
    Code:
    http://YourDomain.com/wp-rss2.php?cat=-3

    The article has a lot of extra details. It's well worth bookmarking if you intend to fool with displaying different combinations of categories at some point.
    On Financial Success - A Practical How To

  3. Join Date
    Jul 2007
    Location
    London, UK
    Posts
    1,604

    Or you can deliver a cleaner url by redirecting the address with a 301 rule on your .htaccess file

    To create a feed like this
    http://YourDomain.com/wp-filtered-feed

    You put a rule like this
    Code:
    RewriteRule ^wp-rss2.php?cat=-3$ http://YourDomain.com/wp-filtered-feed [R=301,L]
    Warning: Untested code!
    Cycling from London to Rochester to Raise Money to build classrooms in Malawi: Donate | Read the Blog

  4. Join Date
    Jul 2007
    Location
    Bucharest, Romania
    Posts
    101

    I've written about how to exclude a category from your feed here: http://www.alltipsandtricks.com/blog/2007/10/17/how-to-exclude-a-category-from-your-blog-feed/

    I tested it on my blog, and it works.
    Learn how to make money online by selling Halloween costumes and artificial Christmas trees and by using the coolest Joomla templates ever. Check out these iPad accessories too.

  5. Join Date
    Sep 2007
    Location
    Seabeck, WA
    Posts
    89

    Thanks for responding Simo. I actually ran across your post while searching (didn't realize it was your blog @ the time). But I'd already tried the functions.php technique...and it didn't work. So I kept searching.

    That technique looks cleaner, but simply ignoring the posts in the feed query is more to my taste.
    On Financial Success - A Practical How To

  6. Join Date
    Jul 2007
    Location
    Bucharest, Romania
    Posts
    101

    That's OK, Aaron, I'm glad you managed to solve it somehow. And I'm happy you found my article via search engines. It means I did a good optimization job
    Learn how to make money online by selling Halloween costumes and artificial Christmas trees and by using the coolest Joomla templates ever. Check out these iPad accessories too.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts