This question already exists: Genesis custom post type pagination leads to 404 [closed] Closed 5 years ago.admin管理员组文章数量:1389758
I have the below filter in my register method that will pull in a specific template file based on a custom taxonomy:
add_filter('taxonomy_template', function($template) {
if (is_tax( 'recipe-categories')) {
$template = ABSPATH . 'wp-content/mu-plugins/sacfoodies/templates/recipe-taxonomy-single.php';
}
return $template;
});
It pull in all the recipe-categories slugs and displays the proper template as shown below:
/recipe-categories/bread/
/recipe-categories/breakfast/
But, I'm attempting to add pagination to the custom taxonomy template and I'm getting a 404 error, so if the URL is /recipe-categories/bread/page/2, the template is not detected anymore.
本文标签: pluginstaxonomytemplate filter not working on pagination
版权声明:本文标题:plugins - taxonomy_template filter not working on pagination 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744740933a2622601.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论