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?

Share Improve this question asked Aug 22, 2020 at 13:17 lolikiloliki 1851 silver badge8 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

You 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