Ad slot hiding by device shows all codes in view-source

Posted in: Newspaper
Post count: 60

Hi I have custom ad slot 4 and 5 set with 2 different ad codes:
http://screencast.com/t/1cf33ZlfxbT8

Custom ad slot 4 is disabled on phone
Custom ad slot 5 is disabled on desktop, tablet l, and tablet p

So if set correctly that means custom ad slot 4 code should be displayed in source code for desktop and tablets. Custom ad slot 5 code should only be displayed on mobile

I am injecting the ads in loop-single using short codes: http://screencast.com/t/kZhSaXMVFB

However when I view source of the page, the css styles are being applied but both scripts are appearing in viewsource on the page: http://screencast.com/t/LOch5Chrs

Is there a way to only show the custom ad slot 4 code for desktop and tablets and only show ad slot 5 for mobile?

Thanks

Post count: 23312

Hello schindyguy,

Unfortunately, our theme does not have such an option that allows you a way to manage your custom ads for each device. This task can be made using the @media queries for each width of the device. I guess that you want that your custom ad 4 to be visible for desktop and tablet and the custom ad 5 only for mobile, right? You can try to use a bit of CSS code and place it in Theme panel.

@media (max-width:767px){
.td-a-rec-id-custom_ad_4{
display:none;
}
}
@media (min-width:767px){
.td-a-rec-id-custom_ad_5{
display:none;
}
}

Hope this helps!

Please notice that we cannot provide custom work at the moment and if you need more customization in this regard, please consider hiring a freelancer/developer to help you.

Thanks for your understanding!

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