Add a html and js code to a single post template

Posted in: Newsmag
Post count: 2

Hi, I need to add a div tag and some javascript to the single post template, so that it loads on all single posts. Can I do it without creating a Child theme? In this case, how should I do it?
I have tried to modify the loop-single.php file to see if it works correctly, but the changes are not showing.
Thanks in advance.

Post count: 35449

H,
It will be better to use a child theme, in this way, when you’ll update the theme, the changes will not be lost.
The files that need to be edited are those that are used, if you use post template 1 then you need to edit this one wp-content/plugins/td-composer/legacy/Newsmag/parts/single/loop-single-1.php -> single_template_1.php and if is the default template, please try this one -> loop-single.php
I hope this will help you!
Thank you!

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