How to hide ad on New update 9.7

Posted in: Newspaper
Post count: 57

I am trying to hide the header ad on homepage on my previous theme I used too use the code below to hide
if(!is_page()){
echo td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'header'));
}
?>

But now this is not working. How can I hide the header ad on homepage.

Thanks

Post count: 35449

Hi,

Is look like your code is adding an ad box, what you want to achieve exactly, to not display that header ad in pages, but to display in posts?

Thank you!

Post count: 57

Hello Calin,

I want to hide header ad from homepage.

Post count: 35449

Hi,

You can use the header manager and set a header without ads on homepage, in this way you’ll not need to change the code in theme files after each update.

Thank you!

Post count: 57

The problem with header manger is I am using ubermenu for my menu and with header manager ubermenu does not work. Is there a way to hide it with code?

Thanks

Post count: 35449

Hi,

You can use a custom css -> https://www.screencast.com/t/iIkcgYY02rb8 and hide only the ads that appear in homepage in header section
.home .td-header-sp-recs{
display: none;
}

You need to set this code in Newspaper > Theme panel>Custom code>Advance css in desktop
-> https://www.screencast.com/t/E68caURj
Modification of the AdSense ad code –> https://support.google.com/adsense/answer/1354736?hl=en

Hope this will help you!
Thanks.

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