I’m using ‘Ads by datafeedr.com’ plugin (http://wordpress.org/plugins/ads-by-datafeedrcom) to manage my banners (create groups, start and finish date, etc).
It’s easy to use it in any ‘Text’ widget just using the provides shortcode for a specific group.
SHORTCODE example:
[dfads params=’groups=352&orderby=random’]
The pluigns offers also que option to inser as PHP… The same example:
<?php echo dfads( ‘groups=352&orderby=random’ ); ?>
However I’m trying to use it on the Ad Spot area of Newspaper theme but I can’t do it. I tried these ways to do it:
-In the custom left menu. Select ‘Newspaper: Ads’ and into Header ad, select ‘Text and spot’ and fill the ‘Top ad spot code:’ with the SHORTCODE.
-In the custom left menu. Select ‘Newspaper: Ads’ and into Header ad, select ‘Text and spot’ and fill the ‘Top ad spot code:’ with the PHP CODE.
-In Theme Options > Ads, create a new space of 728px and put in the ‘Desktop(1200px +):’ the SHORTCODE. Then in the Custom screen > ‘Newspaper: Ads’ select into the ‘Top ad spot’ combo the new 728px ad created with the Shortcode.
-In Theme Options > Ads, create a new space of 728px and put in the ‘Desktop(1200px +):’ the PHP CODE. Then in the Custom screen > ‘Newspaper: Ads’ select into the ‘Top ad spot’ combo the new 728px ad created with the PHPCode.
In none of these cases I got the banners… Any ideas of what can I do to use these spaces as a widget and insert my shortcode/php?
Thanks!!
Hello,
You can insert the shortcode with
<?php echo do_shortcode( '[dfads params='groups=352&orderby=random']' ) ?>
or your php code
<?php echo dfads( ‘groups=352&orderby=random’ ); ?>
in logo_ad.php http://screencast.com/t/WqmwYFCgAMr in that div span8
Thanks for the message
Hi!
I tried to insert that shortcode in my AD, selected that AD in the customizer but nothing happens. The top ad area is completly white/hide.
Look at this screenshot to see what I’m using.
https://www.dropbox.com/s/97mviw1hyuqswkt/pc.jpg
Any ideas of what can I do?
Thanks!
Hello,
Not there. Paste that code in logo_ad.php file http://screencast.com/t/WqmwYFCgAMr in that div span8
like here: http://screencast.com/t/L4ZnkJ5Cu
Hope to manage it. Thanks
Hi Marius!
I tried this but got an error!
https://www.dropbox.com/s/mi9a2u580wz6w6c/logo_ad_error.jpg
In the top you have the error in the browser and then the text editor where you can see what I do.
Thanks!!
Hello,
use like this <?php echo do_shortcode( "[dfads params='groups=352&orderby=random']" ) ?>
http://screencast.com/t/VbBH6pea9N9
Hope this work. Thanks for the message!
Hi Marius!
It’s nearly 99% done! I didn’t realise to delete the code for the current ads system. I did it and use the php shortcode with ” instead ‘ and it’s running now!
The ‘problem’ now is the the ads are being displayed but aligned to the top of the screen instead of being vertically centered. Any ideas of how can fix it?
Thanks for your help!