for category feed you must use this : http://example.com/category/categoryname/feed' href='http://example.com/category/categoryname/feed">http://example.com/category/categoryname/feed'>http://example.com/category/categoryname/feed">http://example.com/category/categoryname/feed more information here : http://codex.wordpress.org/WordPressFeeds' href='http://codex.wordpress.org/WordPressFeeds">http://codex.wordpress.org/WordPressFeeds'>http://codex.wordpress.org/WordPressFeeds">http://codex.wordpress.org/WordPress_Feeds
[...] Excluding Posts from Your Wordpress Feed That will keep category with ID 5 out of the feed. You can get the IDs by looking in the wp_terms table in your database. With wordpress 2.1, these terms are tags and categories, and while I haven’t tested it with tags, I have seen that it does work with Categories. [...]
[...] En la RMD, uno de los problemas que había inicialmente es que los miniposts de los feeds agregados en tu blog, también se incluyen en tu feed. Y eso puede suponer una inconveniencia para los suscriptores que no desean nada más que leerte a tí. Hay muchas formas de resolver el inconveniente pero, quizás, una de las mejores es la que veíamos en el blog de Scott Jangro: Excluding Posts from Your Wordpress Feed. [...]
That works to remove undesired categories from the main feed, but it prevents you from generating individual feeds for individual categories.
For example, our main site feed is at:
http://www.mysite.com/index.php/feed
We also had individual category feeds available on each category page using somthing like the following:
http://www.mysite.com/?cat=8&feed=rss2
Those individual category feeds now all display the main site feed. I'm guessing that's because the code you provided sets the categories to display. Is there any way to alter the code so that it only applies to the main site feed?
"rabbit rabbit". Happy March.
While it's not my primary blogging subject, I've got a major subculture here around the subject of DIY electronics repair. My Samsung DLP television is my usual guinea pig, and I get a decent amount of traffic on that topic.
Naturally, I want to write more about that and I have plans to do so, but annoying my regular readers, the people I know personally, with that stuff has always kept me in check.
I discovered this morning that I can write about that stuff and keep those posts out of my regular feed as well as keep them off the homepage if I wish.
It's quite simple to do so. Just add the following code to your template's functions.php file:
function myFilter($query) { if ($query->is_feed) { $query->set('cat','-5'); }return $query; }
addfilter('preget_posts','myFilter');
That will keep category with ID 5 out of the feed. You can get the IDs by looking in the wp_terms table in your database. With wordpress 2.1, these terms are tags and categories, and while I haven't tested it with tags, I have seen that it does work with Categories.
If you want to exclude more than one category, put them in separated by commas '-5,-10,-11'
This is a great solution if you've got some test posts or otherwise stuff you want to post but not hit the RSS. For example, if you're pulling all your twitter posts into your blog, you can avoid cluttering up your RSS with this info.
Also, if you want to keep posts off the homepage, you use if ($query->ishome) instead of isfeed. Or you can do both with this: if ($query->ishome || $query->isfeed)
Thanks to Zeo for this great info.