Quantcast
Channel: Wordpress post category out of the loop but in the rss feed - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Wordpress post category out of the loop but in the rss feed

0
0

in my website, done with wordpress, I have this function for excluding some category from appearing in homepage:

function excludeCat($query) {if ( $query->is_home ) {$query->set('cat', '-14, -64, -68, -22, -15');}return $query;}add_filter('pre_get_posts', 'excludeCat');

But they are excluded also from the RSS feed. There is a way to exclude them from the homepage but include them in RSS Feed?

I use custom RSS created with these functions

function customRSS(){add_feed('ppfeed', 'customRSSFunc');}function customRSSFunc(){get_template_part('rss', 'ppfeed');}

And this is the rss-ppfeed.php file

Thanks


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images