Guest User

Untitled

a guest
Mar 31st, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. $td_display_top_ad = true;
  2. //disable the top ad on post template 1, it breaks the layout, the top image and ad should float on the left side of the content
  3. if (is_array($td_smart_list) && $td_smart_list['td_post_template'] == 'single_template_1') {
  4. $td_display_top_ad = false;
  5.  
  6. //if the post individual template is not set, check the global settings, if template 1 is set disable the top ad
  7. } elseif (empty($td_smart_list['td_post_template'])) {
  8. $td_default_site_post_template = td_util::get_option('td_default_site_post_template');
  9. if(!empty($td_default_site_post_template) and $td_default_site_post_template == 'single_template_1') {
  10. $td_display_top_ad = false;
  11. }
  12. }
  13.  
  14. //add the top ad
  15. if (td_util::is_ad_spot_enabled('content_top') && is_single() && $td_display_top_ad === true) {
  16. $content = td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_top')) . $content;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment