admin管理员组文章数量:1417434
I have a CPT which saves a location and and its slug into wp_postmeta
table. The location is selected from a dropdown in CPT edit page and it is not a taxonomy.
Now I want to create a custom template which needs to understand the value I am passing through the URL such as .
The part himachal-pradesh
is my location slug and I want to pull posts which has the same value in wp_postmeta
table.
I have created a custom template and can use it to create a new page (), but it will actually have the location slug which is dynamic for each location.
What is the right way to achieve this?
本文标签: How can I use a custom template to load custom post type posts based on a postmeta value
版权声明:本文标题:How can I use a custom template to load custom post type posts based on a post_meta value 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745262063a2650399.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论