How can to make a space before the logo header that i can i add a bannee here example https://www.dropbox.com/s/odvkwcw00vrzhju/Screen%20Shot%202016-03-31%20at%2012.01.04%20AM.png?dl=0
-
This topic was modified 10 years by
aliou89.
Hi
You can use one of theme’s ad-spots to display the ad. First insert the html ad’s code in one of custom ad-spots from theme panel > ads then use do_shortcode() function to display a banner ad on top of the page. Just edit the file corresponding with the header style used and add this code like here: http://screencast.com/t/itasx4W4T – http://screencast.com/t/FSgnXBREg3
I’ve used custom ad 1 for this example but you can use any custom ad, just adapt the shortcode. For example if you use custom ad 5 the shortcode will be: td_block_ad_box spot_id="custom_ad_5"
Thanks!
i try but is not display. i went theme panel > ads and i add this html code <iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/NM0bZdZod2E” frameborder=”0″ allowfullscreen></iframe> to custom 1 than i went to header style- 1 than i add the < ?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘); ?> here the url of the site http://www.guineehitmusique.com is not display the add i try google add too but not dispaly
Hi
Sorry about that. Your code wasn’t executed because it is interpreted as a plain text. Try to add this code, now it should work fine:
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_2"]'); ?>
Thanks!
-
This reply was modified 10 years by
Andrei L..
Hi
The code it’s tested and works fine on my side.
Make sure that you added the file corresponding with the header style used and also check if the shortcode added in do_shortcode function is the one for the ad-spot where you inserted the ad-code in theme panel. Also check our documentation regarding banner ad’s usage: https://forum.tagdiv.com/newsmag-using-other-ads/
Thanks!
Here how i passet the code to custom_ad_1 but add is not display
do_shortcode
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– ADD Responsive –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-format=”auto”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Hi
This is the right order to display the ad using do_shortcode function:
I will use custom ad 1 as example:
– paste the ad code in theme panel > ads. custom ad 1: http://screencast.com/t/I4fGyfFoyc
– get the ad-spot’s shortcode. To get the shortcode add an ad box into a blank page then switch in back-end editor copy and paste this code: http://screencast.com/t/Kcqsjk9C7xbU inside do_shortcode function.
– paste the code which render the shortcode in the file corresponding with the header style used. For example if you’re using header style 1 the file which must be edited is header-style-1.php http://screencast.com/t/itasx4W4T – http://screencast.com/t/5vAMrfFwW
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
Thanks!
-
This reply was modified 10 years by
Andrei L..
how can i remove the white background on the banne here https://www.dropbox.com/s/r7eea27dpwl0rk7/Screen%20Shot%202016-04-06%20at%2010.50.57%20PM.png?dl=0 i have a transparent image the white background it still show it up .
The banned add this not show it up on Mobile and desktop .
Hi
Try this css in theme panel > custom code > custom css: http://screencast.com/t/n74dYoc6
.td-header-top-menu{
background: none;
}
Thanks!
Hi
Use this css in theme panel > custom code > custom css to display the banner on mobile: http://screencast.com/t/bXyhzHFIS
@media (max-width: 767px){
.td-header-top-menu {
display: block;
}
.td-header-top-menu .td-a-rec-id-custom_ad_2{
margin-bottom: 0px !important;
margin-top: 0px;
}
}
Thanks!
Hi
You can use is_page() wp function to display the banner on a page with a specific id. The code will look like this:
<?php
if (is_page(page_id)) {
echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
}
?>
Just replace the page_id with the numerical id of the page where you want to display the ad. To get the id follow this link: http://screencast.com/t/0sAaySfVL7
Thanks!
-
This reply was modified 10 years by
Andrei L..
