Apply template based on if it’s an existing or a new post

[ad_1]

I’m redisigning a web with thousands of posts and custom post types. The original site was made with a traditional theme before FSE. I’m developing a block child theme for it, I have to respect the existing content. So I need to keep certain plugins and functionality. But to give the new child theme a better user experience, I need to differentiate the existing content from the new content. My question is: Is there a way to apply a template to existing (old) posts and another template to new created posts? The two approaches I can think of are to apply a different template based on the date of creation, or to automatically assign to new created posts a certain category and automatically apply a different template to posts with that category. If someone can help with one of the two possibilities or has a different approach, I will appreciate their advice. Thanks!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer