AdRotate on Responsive themes
In the past 3 or so weeks I’ve seen this question pop up a number of times.
Is AdRotate compatible with Responsive layouts?
In short; Yes. But…
What does this mean?
AdRotate is not designed for responsive layouts as such. However, AdRotate provides so much freedom when creating adverts that if your theme requires a responsive sort of box. A div with a style or whatever, you can add this to your adverts code.
Where your simple “normal” advert would look like something like this:
<a href="http://www.adrotateplugin.com"><img alt="" src="cdn.ajdg.net/path/to/image.jpg" /></a> |
A responsive version of this advert could be something like:
<div class="responsiveclass"><a href="http://www.adrotateplugin.com"><img alt="" src="cdn.ajdg.net/path/to/image.jpg" /></a></div> |
Where “responsiveclass” would hold the CSS to make the div/box/wrapper work along with the rest of your responsive elements on your page.
This method works best on single/individual adverts and Groups (If every ad in the group has been prepared appropriately) and not really on Blocks. Blocks already have a complex wrapper around them. This is something to improve on in a later version to make it more compatible, too.
Blocks of ads
Keep in mind though that a block of ads is not a block if the elements will be shuffled around when the browser size changes. You would rather want to add a few Groups spread out over the page instead. Trying to keep the block intact would defeat the purpose of the responsive layout. And breaking up the block would defeat the purpose of using a block in the first place.
So yes. AdRotate can work just great with Responsive themes. But it needs to be told what to do. And don’t try it on a block.
I use AdRotate on all my responsive sites (ex. http://www.michiganfireworks.com) There’s no reason it shouldn’t work. HOWEVER it doesn’t detect the viewport and swap ads for you (and if you are using it for AdSense, even Google hasn’t really jumped on the responsive ads as yet – they’ll swap out a mobile ad, but it may or may not fit the space)
The way we got around this (for the moment) is to have a separate theme for mobile viewports, and use different AdRotate groups for the mobile theme. It’s a hack, but it works.
So, reading the above I understand adrotate does not work on responsive sites using blocks. Just this is what I need because I have several ads on a place which have to rotate, thats why I chose ad..rotate!!
Does anybody know if a way to get ad blocks to work on respinsive sites?? Thanks
Blocks work fine, but if you expect the block to break up in individual ads as the size of your screen changes. Use groups instead.
Hello Arnan, Thanks for all the work you put into this really great plugin.
Unfortunatly I think the blocks don’t work fine on tablets for instance.
If you have a look at http://bit.ly/2zDPAq you will see several ads on place, all placed there inside blocks. Now I understand the smaller ads 110x110px will not go from 2 rows to 1 rowe in tablest but for instnce the 230x230px ad at the right does not show well in vertical mode on my theme. The block will not get smaller and ajust to the screen size.
Perhaps I understand it wrong here, I am not an expert but am eager to learn
If the responsive issue will be posible in the future or peraps the posibilty to choose different ads for different viewports as netmeg says, that should do the trick ad I will definetly buy the plugin with a big smile.
As outlined in the post, and my previous response. Blocks work in the flow of a responsive theme but won’t resize or break up.