0

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 1

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.org/reference/functions/add_rewrite_rule/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.