Filter Standard Pack templates?

Posted in: Newspaper
Post count: 16

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?

Post count: 18283

Hello !

I am sorry but I am not sure I understand exactly what you are looking to achieve. Can you provide an example or be a bit more specific ?

Thank you !

Post count: 18283

Hello !

I am sorry but I am not sure I understand exactly what you are looking to achieve. Can you provide an example or be a bit more specific ?

Thank you !

Post count: 16

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….

Post count: 18283

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 !

Post count: 16

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

Post count: 18283

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 !

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