admin管理员组文章数量:1325236
So, I'm grabbing a list of posts from one blog to another using the Wordpress API, I got the list of posts but now on click I would like to show the content of each individual post on my new website.
What's the best approach for that?
Is there a way to create a template file which will serve the /blog/$slug
part of my new website?
So, I'm grabbing a list of posts from one blog to another using the Wordpress API, I got the list of posts but now on click I would like to show the content of each individual post on my new website.
What's the best approach for that?
Is there a way to create a template file which will serve the /blog/$slug
part of my new website?
1 Answer
Reset to default 0You can go with a conventional approach of WP. 1.Create a Custom Template called blog in your theme. 2. Create page called blog in admin and associate with the template. 3.Pass your new posts slug as query parameter to the page. 4. For seo friendly query parameters just flow the doc. https://developer.wordpress/reference/functions/add_rewrite_rule/
本文标签: custom post typesUse a template for a specific url slug without creating a page
版权声明:本文标题:custom post types - Use a template for a specific url slug without creating a page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742167306a2426063.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论