"Article Bottom Ad" not working on smart lists

Posted in: Newspaper
Post count: 436

Hey Awesome people,

Recently I noticed that the “ad codes” from zergnet is not working on any smartlists. So, I used the ad code under theme optional panel- ads- Article Bottom Ad ,
The should be seen at the end of the post like this: https://tomatoheart.com/hiya/ratan-tata-takes-reigns-tata-group/ but it doesn’t appear on any smart lists posts for example: https://tomatoheart.com/rishika/17-crazy-things-home-alone/

What’s the issue, where should I add these codes to appear university at the end of every post ?

Thank you

Post count: 22421

Hi,

Smart lists will igonre inline ads as smart lists have a different implementation than normal posts. Smartlists have their own ads.
Here is an example from a different topic regarding smart list 6:

Smart lists have a specific ad spot in the theme panel but the smart list 6 ad will not position below the pagination. If you want it to show below the pagination, you will have to edit the theme files to do it as there is no option in the theme for it. You can use this code :
$buffy .= do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
And place it like so: http://screencast.com/t/zvRezg4R8rva Then your ad from ‘custom ad 1’ spot will show below the pagination. Unfortunately this will not be a 970 width ad if you use a sidebar because if you do, the main content area is only 696 pixels wide. There can be a large 970 px banner only if you remove the sidebar.

You can adapt the method from smart list 6 to your smart list 1 in this file:
http://screencast.com/t/ke2gPSa65

I hope this helps.
Thank you!

Post count: 436

Okay, so I need to add this $buffy code in all smart lists’ .php file in which I want to display “ad” at the end of the post or do I need to do it only in the case of smart list-1 and smart list-6.

I usually use Smart List-1 and Smart-2 for the desktop version and since td mobile theme plugin is activated, Smart list-7 is shown on mobile device.

So, My prime motto is to display ads at the end of smart list-1, 2 and 7. Should I use the same method as suggested above?

I can also see that there are three different option panel to add ad codes for smart list- 6,7 and 8 ( https://i.snag.gy/z8ZvcF.jpg ) .

Thank you.

Post count: 436

Hi,
So, I finally implemented the code in all smart list type and it’s working well. Though it’s not working on mobile ( with TD Mobile theme plugin ON)

So, I also added this code to “td_smart_list_mob_1.php” but since “custom_ad_1” can’t be recognized by Mobile theme hence it’s not working.

What we can do is to call for “Article Bottom Ad” under mobile theme option (https://i.imgur.com/8bkJGHf.png ) in spite of “Custom_Ad_1” . If it’s possible , please tell me the way or if there is some other way around.

One more thing- So, we already have the same code written in “Article Bottom Ad” section of theme setting panel ( https://i.imgur.com/el1PniV.png ) so, for the desktop version too, Can’t we use
“article_bottom_ad” in spite of “custom_ad_1” in following code:

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

Kindly assist.

Thank you.

Post count: 22421

Hello,

The code will not work for the mobile theme as it uses a different smart list and the mobile ads are different from the normal theme ads. The smart list on mobile is not smart list 7 but rather smart list mobile: http://screencast.com/t/vZRVfoRPJVo
It may look similar to smart list 7 but it’s not.
I have not tested this method on the mobile theme. The mobile theme will not render visual composer shortcodes. You will have to take a look at the mobile theme ads implementation and replicate it on the smart list:
Here is the code you need for the mobile theme smart list ad:
$buffy .= td_global_blocks::get_instance('td_block_ad_box_mob')->render(array('spot_id' => 'content_bottom_mob'));
It adds the bottom ad to the smart list. You can place it like so:
http://screencast.com/t/RtyOwKCaF

Thanks.

  • This reply was modified 9 years by Bogdan B..
Post count: 436

Hi Bogdan,
Thank you for the response. Yes, I know that the smart list template for the mobile theme is different, though it looks like smart-list 7. and as I wrote above in my reply that, I had also tried to include same code in “td_smart_list_mob_1.php”. Anyways,

I tried to put your code as shown in the image http://screencast.com/t/RtyOwKCaF, but unfortunately, it didn’t work. I again tried to by putting this code like this too ( as we did in do_shortcode option for desktop smart lists version ), but it didn’t work either 🙁

So, here is my two try:
1.


      // render the pagination
        $buffy .= $this->callback_render_pagination();

        $buffy .= '</div>';
            $buffy .= td_global_blocks::get_instance(‘td_block_ad_box_mob’)->render(array(‘spot_id’ => ‘content_bottom_mob’));
        return $buffy;
    }

2.


       

    protected function render_after_list_wrap() {
        $buffy = '';
        $buffy .= '</div>'; // /.td_smart_list_1  wrapper with id
        $buffy .= td_global_blocks::get_instance(‘td_block_ad_box_mob’)->render(array(‘spot_id’ => ‘content_bottom_mob’));
        return $buffy;
    }
}

What should I do now? Will you please try this.. as it can be really for many of us. Having a “bottom contextual article ads” from Outbrain, content.ad are a necessity these days, and we have 70% visitors on mobile. So…. please

Thank you…

  • This reply was modified 9 years by Nano.
  • This reply was modified 9 years by Nano.
Post count: 22421

Hello,

I have tested the solution before I provided it. It worked fine on my end. I forgot to put the code inside the “code” tag though and the forum could have converted the comma’s I have edited my reply so try the code again as it;s now inside a code tag and it should run properly. After you implement it as i have shown in my screenshot, make sure you have an ad code in the article bottom ad in the mobile theme like so: http://screencast.com/t/4rL35mWqrXNU

Thanks.

Post count: 436

You were absolutely right.

This time it worked perfectly well.

Thank you 🙂

Just one thing :

As the SPOT ID for the “article bottom ad” for mobile theme is “content_bottom_mob”
and the SPOT ID for the “custom ad 1” under theme settings- Ad setting is “custom_ad_1”

What’s the SPOT ID for “article bottom ad” under theme settings- ad ?

For the desktop version, I currently have the same ad code under ” article bottom ad” and “custom ad 1” so, I want to save one space and use the “article bottom ad” spot Id.

Thank you.

Post count: 22421

Hi,

On the main theme you can see the shortcode in visual composer when you create an ad box. You can see it in the code as well http://screencast.com/t/7eSMFhgfAYle but it;s simpler to create and box and place the ad you want in it and take a look at the shortcopde in classic mode: http://screencast.com/t/SrqijWYz85http://screencast.com/t/5OzT24ZMcNQ

Thanks.

Post count: 436

I get it perfectly.

Thank you. 🙂

Post count: 15

I use the smart list 6 and for mobile i want one below the featured image or below the title. Where should I place the code ( and what code )
I would use the custom code 2

Post count: 22421

Hi,
The mobile theme will convert your smart list to the single smart list available on the mobile theme.
Them mobile theme also features a custom smart list ad that positions just below the featured image as you want it: http://screencast.com/t/mFsduJMRiy
The above method was to move the ad in a different place.
Thank you!

Post count: 15

Oh yes I know. That’s what I am looking for too. I want it somewhere located here
http://prntscr.com/d2m09q

Post count: 22421

Hello,

For that particular positioning, add the code like so: http://screencast.com/t/CoEp4e7RoBTN
You have to place it just above the top callback_render_pagination code on line 30

Thank you!

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