Category Page Ads

Posted in: Newspaper
Post count: 9

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

Post count: 7909

Hi,

Please provide a link so I can inspect this and provide an accurate solution.

Thanks!

Post count: 9
Post count: 7909

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!

Post count: 9

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..

Post count: 7909

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!

Post count: 9

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?

Post count: 7909

You have to add the css code in Theme Panel > Custom Css: http://screencast.com/t/8gRXgqCDX

Thanks!

Post count: 9

I can’t believe, so simple.

Thanks again 🙂

Post count: 364

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

Post count: 7909

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!

Post count: 364

Too easy 😉
Works perfect, thanks for your help!

Post count: 364

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

Post count: 7909

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/QqfqBgr3fcN6http://screencast.com/t/iecdnat7YI

Thanks!

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