admin管理员组文章数量:1130349
In Wordpress I created 2 templates :
- The first template is a custom homepage
- The second template is custom page for for post results(search by category, search by keywords)
After that I specified them in Wordpress
The custom homepage is successfully shown when I visit the website, but when I click on a specific category, my custom posts page is not showing and I get the default page instead.
In Wordpress I created 2 templates :
- The first template is a custom homepage
- The second template is custom page for for post results(search by category, search by keywords)
After that I specified them in Wordpress
The custom homepage is successfully shown when I visit the website, but when I click on a specific category, my custom posts page is not showing and I get the default page instead.
Share Improve this question asked Oct 16, 2018 at 18:54 Amine MessaoudiAmine Messaoudi 1116 bronze badges 1 |1 Answer
Reset to default 0For categories you would have to edit the archive.php or rather to be specific the category.php file.
https://codex.wordpress/Category_Templates
That page will give you an idea of the specificity you can go with template files.
In Wordpress I created 2 templates :
- The first template is a custom homepage
- The second template is custom page for for post results(search by category, search by keywords)
After that I specified them in Wordpress
The custom homepage is successfully shown when I visit the website, but when I click on a specific category, my custom posts page is not showing and I get the default page instead.
In Wordpress I created 2 templates :
- The first template is a custom homepage
- The second template is custom page for for post results(search by category, search by keywords)
After that I specified them in Wordpress
The custom homepage is successfully shown when I visit the website, but when I click on a specific category, my custom posts page is not showing and I get the default page instead.
Share Improve this question asked Oct 16, 2018 at 18:54 Amine MessaoudiAmine Messaoudi 1116 bronze badges 1-
You can't use page templates for the custom posts page, besides, all of that can be done with
search.php, hidden inputs, and URL parameters, there's no need for the page template – Tom J Nowell ♦ Commented Oct 16, 2018 at 19:28
1 Answer
Reset to default 0For categories you would have to edit the archive.php or rather to be specific the category.php file.
https://codex.wordpress/Category_Templates
That page will give you an idea of the specificity you can go with template files.
本文标签: customizationwordpress custom posts page not showing
版权声明:本文标题:customization - wordpress custom posts page not showing 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749256854a2340623.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


search.php, hidden inputs, and URL parameters, there's no need for the page template – Tom J Nowell ♦ Commented Oct 16, 2018 at 19:28