I am using static category pages with the following code:
add_filter('request', function( array $query_vars ) {
if ( is_admin() ) {
return $query_vars;
}
if ( isset( $query_vars['category_name'] ) ) {
$pagename = $query_vars['category_name'];
$query_vars = array( 'pagename' => "$pagename" );
}
return $query_vars;
} );
There is a problem with the RSS feed though. Normally the feed would show with SITEURL/category/feed but it’s not the case with static category pages. Need the feed so my client can apply for Google News.
Any solutions?