It looks like Newspaper greatly deviates from the standard WordPress way of managing post hierarchies.
I need to add the following code below to modify single.php templates. This should be possible by hooking the function that runs to load the Standard Pack templates, I just can’t find out what to hook.
What do I have to hook to filter single.php templates?
-
This topic was modified 5 years by
EDCResearch.
Well, I need to modify single.php for posts.
The problem? The theme uses Standard Pack, and thus single.php is ignored!
It works if I create a new CPT, but I need to modify single.php for posts.
So, now I need to use a filter to modify the Standard Pack single code….
Hello !
In order to edit the post template on standard pack you will have to do it manually in the post template that you use. You can see all of them here: wp-content\plugins\td-standard-pack\Newspaper\parts\single
You can add this into a child theme too if you want: https://forum.tagdiv.com/the-child-theme-support-tutorial/
I hope this was helpful !
Thank you !
Hmmmmm that won’t quite work, either. Essentially I need to check if a post is in a certain category. If it is, then I need to use a certain layout, if not, then I will use the default.
For example if I was using a standard single template (build the WordPress way) I would use the code below
php if(in_category('special')):
THE SPECIAL TEMPLATE GOES HERE
php else: ?>
DO THE REGULAR TEMPLATE
php endif
-
This reply was modified 5 years by
EDCResearch.
Hello !
Unfortunately this won’t apply in Newspaper Theme. The only options you have is the one shown above for Cloud library templates or having them manually set in post or globally from theme panel: https://www.screencast.com/t/GmMrTUFTCbR ; https://www.screencast.com/t/kMBUHb335F
I hope this was helpful !
Thank you !