Display Article Top and Bottom add in smart list

Posted in: Newspaper
Post count: 13

Hi,

I asked you if it’s possible to show the top and bottom article ads in the smart list style 2 and you replied create a post here in order to provide me with the solution.

Thank you.

Post count: 22421

Hello,

The ad can be added through the theme files as there is no setting in the theme panel for it. You will have to use a do_shortcode function like so:
$buffy .= do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
http://screencast.com/t/CdtFm4tuWI6 for the top ad
and add the code here for the bottom ad: http://screencast.com/t/ArLMAzh56m

Thank you!

Post count: 13

Hi Bogdan,

The thing is that we need the ad to be display below the featured image not at the start of the smart list.

Same as here
http://studentlife.com.cy/2016/05/03/quiz-mathe-ton-typo-sou-otan-psonizis/

Furthermore, what is the ad location id for the Article Top ad and the Article Bottom ad?

Thanks.

Post count: 22421

Hi,
If you want the ad to be present on every slide below the featured image, then please add the code like so:
http://screencast.com/t/Gtene2ovzI
Thank you!

Post count: 13

Hi Bogdan,

Sorry for bothering you again however the solution you provided it’s not suitable for our needs.

We would like the ad to displayed below the featured image of the post not below every slide in the smart list.

Please see this link in order to understand better our needs
http://studentlife.com.cy/2016/05/03/quiz-mathe-ton-typo-sou-otan-psonizis/

Thanks

Post count: 22421

Hi,
If you want place an ad at the top of the smartlist, you can simply add it inside the post content when editing the smartlist without altering the theme files. Add it as a html code directly above the smartlist title: http://screencast.com/t/vvNfuOgfNY
Thank you!

Post count: 13

Hi Bogdan,

Unfortunately this not an option due to the fact that I am not the one writing the article but around 50 people. It’s hard to explain to each one of them that they have to do this each time they write a smart list article.

As I saw in the code of wp_booster and more specific the get_content function. if a post is a smartlist the function returns the smart list so the parts that are being used in order to display the ad are not executed therefore they are not displayed. is there a way where the ads are executed and returned with the smart list?

Post count: 13

Hi Bogdan,

I think I may have found the solution

in the td_module_single_base.php file in the /includes/wp_booster directory

I change the following

return $td_smart_list_obj->render_from_post_content($smart_list_settings);

to this

if($td_smart_list['td_post_template'] == 'single_template' || $td_smart_list['td_post_template'] == 'single_template_2' || $td_smart_list['td_post_template'] == 'single_template_9'){
$content = $td_smart_list_obj->render_from_post_content($smart_list_settings);
}else{
return $td_smart_list_obj->render_from_post_content($smart_list_settings);
}

and it seems to work just fine.

Could you please confirm that this is the right way to go?

Thanks

Post count: 22421

Hi,
That seems to do it. It will also show the article inline and article bottom ads, but if you do not use them, then it’s a viable solution.
Thank you!

Post count: 13

Hi Bogdan,

Thank you for your reply.

All the best!

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