Change post template to style 5 for old posts

Posted in: Newspaper
Post count: 32

Hi! I’m using Newspaper since 2015 or so and our template by default is Style 7 with huge header image (cover photo). But we also have thousands of articles prior 2015 and it’s very tiring to manually setup cover image for old posts or to change it to “head-less” style (style 5).

Is there a way (maybe even a SQL code) to change all pre-2015 posts’ style to Post Template Style 5?

Thank you!

Post count: 20688

Hi,

Maybe that would be possible, but you should if possible ask some database professionals and make database backups before trying in case something goes wrong. This would be a similar topic
https://forum.tagdiv.com/topic/change-style-of-multiple-posts-at-once/

Thanks

Post count: 32

OK, thank you!

Can you at least point what should I change in the database to change the style?

Something like: find all ‘td_post_template’ string in the wp_postsmeta > td_post_theme_settings

Post count: 20688

You could consider and try something else maybe, for example, if there is no featured image set, display a placeholder image of your choosing in the top post header. Try this condition in the post template 7 file
This is the modified template 7 file (single_template_7.php) you could give it a try
https://pastebin.com/8wieaZKU
Replace the URL with an image of your choosing.
For database advice I cannot help you, that should be done and tested by professionals, since unpredictable things can happen.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.