hi,
I managed to set up the front page with an ad-block (1054px wide) under the main menu. that’s perfect.
now, I would like to make it appear, in the same position (I mean before article title, before widgets), in the article as well.
is it possible?
thank you
Hi,
You can add your custom ad in an ad box in visual composer and then get the sortcode for it. For example
[td_block_ad_box spot_id="custom_ad_1"]
Then you can use the do_shortcode function like so:
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]')?>
Then you can insert this code directly in one of the post template files: http://screencast.com/t/XcVZQFqLiS
Add the code where you want it to appear: http://screencast.com/t/JiV0WVpXx
Thanks.
hi,
thank for you quick reply.
I followed what you suggested, but it simply shows in the article as text:
[td_block_ad_box_spot_id="custom_ad_4"]')
maybe I missed something?
thank you
Hi,
Maybe you did it wrong. Try it like so: http://screencast.com/t/fdqPjCsJk
result: http://screencast.com/t/YXaff1saCqmT (I added it below the crumbs.you can add it above if you want)
If you add it above the breadcrumbs, there will be no margin on top so in this cae you will need to make use of a bit of htm and css and add the code inside a div like for example
<div class="mycustomad"><?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_4"]')?></div>
and then use css to apply a margin-top for positioning:
.mycustomad{
margin-top:10px;
}
I hope this helps.
Thanks.
hi Bogdan,
thank you.
I did exactly what you kindly suggested, look:
<div class="td-main-content-wrap">^M
^M
<div class="td-container td-post-template-1 <?php echo $td_sidebar_position; ?>">^M
<div class="td-crumb-container"><?php echo td_page_generator::get_single_breadcrumbs($td_mod_single->title); ?></div>^M
<?php echo do_shortcode('[td_block_ad_box_spot_id="custom_ad_4"]')?>
<div class="td-pb-row">^M
<?php^M
^M
//the default template^M
switch ($loop_sidebar_position) {^M
default:^M
?>^M
it shows on the page as text: [td_block_ad_box_spot_id=”custom_ad_4″]
http://snag.gy/xrnsX.jpg
let me know
thank you
hi,
You are not using the correct code. Please copy the code I provided. You are adding a ‘_’ before the spot id:
http://screencast.com/t/3AAYYFzyMIo
Thanks.
hi,
thank you for having spotted the typo for me 🙂
thank you for your patience
Hi there,
I have a shortcode [LiveEmbedCode] that I want to embed on the top of the homepage. Can this be done on the visual editor using a block or something or do I have to EDIT PAGE content? I tried creating an ad box and insert it as a code but this does not work.
Thanks
Hello,
@mixos
Please let me know the type of shortcode, is for ads? https://forum.tagdiv.com/ads-adsense-overview/
You can try to add the shortcode in one of those elements: in an element called raw HTML => https://prnt.sc/10jfzg2 or you can try to set the shortcode in column text or text with title, in text zone => https://www.screencast.com/t/yzHiFcS8g8 -> https://www.screencast.com/t/uDXaxJ8JSKFB. The shortcode is automatically saved.
Thank you!
Hello,
This is the screenshot with text with title which look similar with column text https://i.imgur.com/z3xD9vr.jpg
Thank you!