Hi guys,
Is it possible to organize category page ads, post and ads in one row?
Original: http://www.screencast.com/t/MJ2DPqHpVf
Requested: http://www.screencast.com/t/c6ZBjiD04zl
Hi,
Please provide a link so I can inspect this and provide an accurate solution.
Thanks!
Here is a link 🙂
Hi,
Unfortunately this is not an easy task, I have tried with css but it cannot help because break the row: http://screencast.com/t/S7nl6Msw5q
I have managed to find a solution but your ad will be added to the bottom: http://screencast.com/t/ZTuap2iuFzjU
You have to add your custom ad like this in the loop.php file:
*add $adcounter = 0; like this: http://screencast.com/t/agBFQMJ8XjE
*also this code bellow end loop: http://screencast.com/t/WnNkAd4mGMit
$adcounter++;
if (is_category() && ($adcounter == 1)) {
echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]');
}
Hope this helps!
Hi,
That’s is exactly what i did. What if i want to show two ads in one row, side by side, can i organize ads like that?
Thanks..
Hi,
Yes you can add also custom ad 2 like this: http://screencast.com/t/nF9g5FTZGq and use css code like this: http://screencast.com/t/18SAuwJo
You use adsense and you have to use this class td-g-rec-id-custom_ad_1:
.category .td-g-rec-id-custom_ad_1{
float:left !important;
}
And use even number of articles: http://screencast.com/t/Qje2DVwX
Thanks!
-
This reply was modified 11 years by
Alin [tagDiv].
Hi Alin,
Thanks for the solution. I got step one, but don’t know how to do step two. i can see the screenshot LiveCSSEditor, is it a plugin?
You have to add the css code in Theme Panel > Custom Css: http://screencast.com/t/8gRXgqCDX
Thanks!
Hi, I tried to implement 2 ad blocks, one on top and one at the bottom, by changing the loop.php with the provided code. Unfortunately this leads to an Adsense ad on top of the articles that is not clickable. Can you please check what went wrong?
One of the categories as an e.g. is here: http://starzip.de/category/stars
Thanks, Loano
Hi,
If you are using this module you don’t need to float left the ad – http://screencast.com/t/BVuxyWyzl so please remove that css part leave only margin bottom.
Thanks!
One last question, how should this code
$adcounter++;
if (is_category() && ($adcounter == 1)) {
echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]');
}
look if I would like to use it for the loop-attachment.php, in order to get ad on attachment pages?
Thanks, Loano
Hi,
To can display a custom add in attachment pages just use the do_shortcode function where you want to display it for example: http://screencast.com/t/QqfqBgr3fcN6 – http://screencast.com/t/iecdnat7YI
Thanks!