Insert adv code in posts

Posted in: Newsmag
Post count: 5

Hi there.

I have to insert a ADV code in my website http://www.ilgroane.it, inside every post.

Look at this post:

https://www.ilgroane.it/groane/cogliate/coronavirus-a-cogliate-la-generosita-di-un-commerciante-regala-mascherine-ai-colleghi/

I need to place code with some banners after the comments.

This is the code:

<!– ########### Ad Script for ilgroane.it_cl_widget ################# –>
<script type=’text/javascript’><!–// <![CDATA[
OA_show(3533);
// ]]> –></script>
<!– ####### Fine Ad Script for ilgroane.it_cl_widget ################ –>

I don’t understand in which file do I have to place the code.

Can you help me?

Thanks

ag

Post count: 35449

Hi,

You can set these ad in theme panel > ads -> https://i.imgur.com/QqVdE7a.png -> https://i.imgur.com/pX5RFcH.png -> https://forum.tagdiv.com/newsmag-header-ads/ -> unfortunately for the moment these are the only spot ads in Newsmag theme.

Thank you!

Post count: 5

Hi Calin and thanks for your reply.

Unfortunately, this is not what I need.

I need to replicate what I already did on another website with always Newsmag installed.

Check here:

https://ilsaronno.it/2020/03/24/coronavirus-made-in-italy-il-nuovo-test-in-unora-e-della-diasorin-che-ha-sede-anche-a-gerenzano/

See “Related items” at the bottom of the page after comments:

https://www.dropbox.com/s/d3pr77ywklgpelo/Screenshot%202020-03-24%2016.21.45.png?dl=0

To do this, I needed to hard code template file single_template_3.php (see below):

https://www.dropbox.com/s/i7lpr9pdf2qdnce/Screenshot%202020-03-24%2016.24.23.png?dl=0

I can’t find in Newsmag version installed on ilgroane.it this file but I only have only single.php file.

Is this the one I need to change to place the code I wrote you in the first message?

Can you tell me exactly where?

Thanks.

ag

Post count: 35449

Hi,

If that code need to be set in theme files, more exactly in single_template_3.php, than you can find this file (and rest of them) on this path -> wp-content/plugins/td-composer/legacy/Newsmag/parts/single/single_template_3.php -> https://i.imgur.com/DRlddPH.png

Updating the Core of the tagDiv Themes for Envato WordPress Requirements -> https://tagdiv.com/updating-the-core-of-tagdiv-themes/

Hope this will help you!
Thank you!

Post count: 5

Thanks Calin, I missed your answer. Now I try.

Have a nice day!

ag

Post count: 5

Hi Calin.

We have three websites with Newsmag template:

– ilsaronno.it
– iltradate.it
– ilgroane.it

On ilsaronno.it and iltradate.it I placed the code where you told me and it worked. It didn’t on ilgroane.it.

What I noticed is that some pages use single_template_3.php or single_template_4.php while other pages not.

For example, which file do I have to hard code to place code in this page?

https://www.ilgroane.it/primo-piano/coronavirus-come-vanno-le-code-davanti-ai-supermercati-di-saronno-carrefour-e-lidl/

I couldn’t find “single_template_3.php” in source code of the page so I can’t understand which template is using.

Thanks.

ag

Post count: 35449

Hi,

If I’m right on this post you have set the default post template, this can be change in this file path -> wp-content/plugins/td-composer/legacy/Newsmag/loop-single.php

Also the post template files are compose from two php files, for example loop-single-3.php and single_template_3.php in this case the code that is not set in single_template_3.php is set in loop-single-3.php. -> https://i.imgur.com/pBUmH6h.png

Hope this will help you!
Thank you!

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