Quantcast
Channel: WordPress › Support » Topic: Exclude categorys from feed but keeping functionality
Browsing all 3 articles
Browse latest View live

roxer82 on "Exclude categorys from feed but keeping functionality"

Hello, I need to exclude some categories from main feed, so I added $posts = query_posts('cat=-1,-5,-8'); before while( have_posts()) : the_post(); in feed-rss2.php It worked, but now, categories and...

View Article



Josh (Ult. Tinymce) on "Exclude categorys from feed but keeping functionality"

Hmmm... I think this function should do the trick: function exclude_my_cat($query) { if ($query->is_feed) { $query->set('cat','-1,-5,-8'); } return $query; }...

View Article

roxer82 on "Exclude categorys from feed but keeping functionality"

Thank you very much Josh! It works perfect. And I'll take your advice about WP core.

View Article
Browsing all 3 articles
Browse latest View live




Latest Images