Wordpress Technology

Wordpress Tips, Tutorials, Hacks

Exclude Categories From RSS

If for some reasons we have to exclude one or several categories from RSS, it can be done this way. Insert into functions.php next code.

function myFilter($query) {
	if ($query->is_feed) {
	return $query;

In this case 5 means excluded category id.

If we need to expel more than one categories, their id must be inserted in the second parameter of the set() method.


Both comments and pings are currently closed.

© 2009 | Made by Vancouver Web Design | Internet Marketing