admin管理员组文章数量:1316841
My plugin has custom Post Types that open on a custom page triggered by the following hook:
add_filter ('template_include', 'taxonomy_template'); // PRINTING PAGE
however, this page only appears when I access the menu:
Settings > Permanent Links
and saved without even changing anything, is there a hook that makes this check and saves automatically?
My plugin has custom Post Types that open on a custom page triggered by the following hook:
add_filter ('template_include', 'taxonomy_template'); // PRINTING PAGE
however, this page only appears when I access the menu:
Settings > Permanent Links
and saved without even changing anything, is there a hook that makes this check and saves automatically?
Share Improve this question asked Nov 5, 2020 at 18:17 Alisson CustodioAlisson Custodio 12 bronze badges 5 |1 Answer
Reset to default 0The solution found was to update the rewrite rules right after registering my new post type, using this code at the end of the function:
flush_rewrite_rules();
本文标签: hooksShow Post Types customized in Template Page
版权声明:本文标题:hooks - Show Post Types customized in Template Page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742013694a2413368.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
template_include
examples – Howdy_McGee ♦ Commented Nov 5, 2020 at 18:22