Put image ad(s) above wordpress admin bar?

Posted in: Newspaper
Post count: 174

Is there a place in visual composer to place an image (ad) so that it’s responsive on all devices? From what I saw, there are no ad spots above the admin bar (which is good spot for many impressions). Is there a hack for this? I have gotten it to somewhat work (doesn’t look great though like the adsense ads), by editing /parts/header/header-style-5.php file. But is there a cleaner way?

I’ve looked at this https://forum.tagdiv.com/using-other-ads-non-adsense-ads/. Can I put this code in the header-style-5.php file and wrap my image in it?

Post count: 174

From here https://forum.tagdiv.com/using-other-ads-non-adsense-ads/ , I ended up doing this in the php header 5 file.

<div class=”td-visible-desktop”> </div>
<div class=”td-visible-tablet-landscape”> </div>
<div class=”td-visible-tablet-portrait”> </div>
<div class=”td-visible-phone”> </div>

It has the images centered. Is there a way to stretch the image 100% so it fills up the space for each device, but that keeps the image in tact? (i.e. so that parts of image contents don’t get clipped).

  • This reply was modified 9 years by JJ0000.
Post count: 20688

Hi,

You could use a bigger image if possible, it should be responsive. If the container does not have a fixed width this is possible. In this example I used a simple link with a big image size, and it is responsive
https://www.screencast.com/t/si4FUyFSC5iL
https://www.screencast.com/t/Gt6dNX6K8
https://www.screencast.com/t/B5usvfcWPW
You could also wrap the code with the div and classes that you mention, and create different ads for specific devices. These classes will work if you place them there, they have corresponding Css media conditions in the theme stylesheet.

Thanks

Post count: 174

Works, thanks for help

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