Use of single.php from td-standard pack or theme root

Posted in: Newspaper
Post count: 3

Hello all,

we have a site running Newspaper 10.3.9.1 on top of wordpress 5.6. It works like a charm.

However, for posts with custom types created using the Pods plugin I’ve run into a small issue and I’m a bit lost. When accessing any one of those they are displayed using wp-content/themes/Newspaper/loop-single.php instead of wp-content/plugins/td-standard-pack/Newspaper/loop-single.php like the rest of the content. I checked by editing both files and adding a custom marker inside.

Is there any way to make posts of these custom types use the standard template? I can create a small child theme and put the loop-single.php file from the standard pack there, and while that works it seems like a bad hack.

Thanks

Post count: 35449

Hi,
Maybe the child theme is not sound so good, but is the best option, because in this way those option will not be lose when you update the theme, therefore in this situation from may perspective the child theme is the best.
Thank you for your understating!

Post count: 3

Hi Calin, thanks for your response.

Yes, adding this file from the standard Newspaper theme will solve somehow the issue but whenever I get an update from Newspaper I’ll have to overwrite that file.

Perhaps the question should be, how does Newspaper decide whether to use one file or the other?

Custom post types from other plugins (Seriously Simple Podcasting for example) render fine and use loop-single from the td-standard-pack plugin.

Post count: 18283

Hello !

The best would be for you to create a child theme. This will protect your from the updates. Follow our guide here in order to set it up: https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thank you !

Post count: 3

Hello Vlad,

thanks for your answer. We are going to do that (overwrite core file in child theme) while I try to figure out why it is behaving that way.

However that is not exactly something that feels right and if I update Newspaper and forget to do the same in the child things will break.

Regards

Post count: 18283

Hello !

Please note that rarely Newspaper theme has big updates that will require your attention in updating the child, usually there are small bug fixes, updates on page speed, new features for the cloud templates. None of this will affect your child, therefore in our opinion this would be the best solution.

Thank you !

Post count: 22

Hello, I’m using the same Pods plugin for management of custom post types. I have created child template with the help of your documentation. I have also created custom taxonomy-related template single-my_taxonomy_name.php. So far so good. Now the tricky part – where to put custom/child version of loop-single.php? I’ve tried /Newspaper-child/parts/single/loop-single.php. However, it doesn’t work. Any change in the loop-single.php file is not reflected.

Post count: 18283

Hello !

Please make sure that you added the loop-single and the single template too.

For example, you add loop-single1 and single template 1 in order to work. Both of them must be in the child theme.

Thank you !

Post count: 22

And both of them should be in the root folder of the child theme or the loop-single goes to /parts/single subfolder?

Post count: 22

Solved. Both of them in root folder. Thanks.

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