Creating ‘Datafeedr Ads’ WordPress Plugin Multi Columns Ads Layout through CSS, Here is How?

Few days back I started using ‘Datafeedr Ads’ WordPress Plugin for randomly producing Affiliates Ads layout in my websites’ sidebar

 
I searched & found that plugin itself doesn’t have inbuilt functionality to layout ads in two columns or three columns

 
Main Problem: Problem was something like this,

 
Plugin was lay outing or distributing ads randomly as

 
Ad 1
Ad 2
Ad 3
Ad 4
Ad 5
Ad 6

 
But instead expected result was something like, it was distribution of Ads in Two columns like this

 
Ad 1 | Ad 2
Ad 3 | Ad 4
Ad 5 | Ad 6

 
i.e. In ‘Z’ English character order.

 
After contacting Datafeedr Plugin Creator & Author he told me, “You have to use CSS Lay outing for this”.

 
So After working for few long hours I came up with tis solution: I used ‘CSS Multiple Columns’ Lay outing technique to succesfully use & distribute ads in two columns

 

<div style="float:left; width:270px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; column-width:auto; -webkit-column-width:auto; -moz-column-width:auto; column-count:2; -webkit-column-count:2; -moz-column-count:2; column-gap:5px; -webkit-column-gap:5px; -moz-column-gap:5px;">
<?php echo dfads( 'groups=51&limit=6&orderby=random' ); ?>
</div>

 
Note: Replace below code with your expected & relevent PHP code generated through your Datafeedr Ads plugin settings page.

 

<?php echo dfads( 'groups=51&limit=6&orderby=random' ); ?>

 
And I was more than happy that I solved it,

 
Thanks & Regards
Mandar Apte

Mandar Apte

This website contains a design articles blog by Mandar Apte. He writes and shares his iOS development, graphic, web, & animation film design experience through articles. Mandar is Mumbai based multi-disciplinary designer with expertise in UI, UX, Logo, Symbol, and Brand Identity design. He is an alumnus of Sir J. J. Institute of Applied Art, Mumbai. He currently runs his studio in the heart of the city of Mumbai.

3 thoughts on “Creating ‘Datafeedr Ads’ WordPress Plugin Multi Columns Ads Layout through CSS, Here is How?

  1. I am not familiar with where to put this code. Can you please share? Is it in the adfeedr iteself or someplace else?
    Thanks so much.

Leave a Reply

Your email address will not be published. Required fields are marked *