How to display custom ad slot in smart list 5 below first image only

Posted in: Newspaper
Post count: 60

I want to insert the content_inline adbox in smartlist 5

I found this thread https://forum.tagdiv.com/topic/need-help-about-block/#post-120048 where Caitlin showed how to add an adslot at the bottom of smartlist 5 by adding

$buffy .= do_shortcode('[td_block_ad_box spot_id="content_inline"]');

to /wp-content/themes/Newspaper/includes/smart_lists/td_smart_list_5.php

here: http://screencast.com/t/LTyumMT6

But that displays the adbox at the bottom of the entire smart list http://screencast.com/t/Zh2tB3lHL.

Where can I insert $buffy .= do_shortcode('[td_block_ad_box spot_id="content_inline"]'); in /wp-content/themes/Newspaper/includes/smart_lists/td_smart_list_5.php or another file so that the ad will only display after the first image item in smart list 5? For example on your smart list 5 demo: http://demo.tagdiv.com/newspaper/smart-list-style-5/ have the adbox appear only under the first imagel- please see http://screencast.com/t/pOMS6eKx0L45

Post count: 6535

Hi

You can use this code to display the add only after first image: http://screencast.com/t/1RpglB4U

if ($current_item_number == 1){
$buffy .= do_shortcode('[td_block_ad_box spot_id="content_inline"]');
}

Hope this helps.
Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.