how to implement an content.ad unit within a template tag

Posted in: Newspaper
Post count: 1

Hi

I’m trying to figure how should I add a content.ad unit within the page layout using the visual composer

The implementation requires placing this piece of code <?php do_action(‘contentad’); ?> within the template tag

I Tried using one of the custom adboxes but it looks like it won’t run the php code

could someone guide me on a solution for this?

Post count: 7909

Hi,

Unfortunately there is no option to add php code with Visual Composer plugin, you could try to edit page template that you use and add php code directly there.

Thanks!

Post count: 28

Hey Alin,

On this topic , I am currently integrating <?php do_action(‘contentad’); ?> into my singleloop.php file and it’s working fine , but it’s slowing my page load time like crazy ..

Is there any hacks I can do in my functions.php file or in the TD Speed booster Plugin php to make this load last thing and not hold up the rest of the page ?

Cheers,

Post count: 6600

Hi,

You could try to use short-codes and render ad codes from one of your panel ad spots, you can use do short-codes function to add it on your template, use this method: https://forum.tagdiv.com/topic/how-to-add-an-adsense-code-below-of-the-latest-articles-in-homepage/#post-33395
I suggest you also address this question to plugin’s authors or search for a solution online.

Thanks

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