*

Darwazo

  • ***
  • 81 posts
Ads between Search Listing - After Every 3rd Ad listing
« on: April 12, 2019, 10:59:05 AM »
Hi Frosticek

Earlier thread on ad after every 6 ads didn't work for me......

Kindly help me

I pasted Adsense code in Adsense Area of theme and tried your code but that work for me.


My current relevant code on search list is :


  <?php $c = 1; ?>
  <?php while(osc_has_items()) { ?>

    <?php veronika_draw_item($c, 'list'); ?>

    <?php if($c == 3) { ?>
      <?php echo veronika_banner('search_list'); ?>
    <?php } ?>

    <?php $c++; ?>
  <?php } ?>
</div>


Thanks

Marked as best answer by Darwazo on April 12, 2019, 11:59:35 PM
*

MB Themes

Re: Ads between Search Listing - After Every 3rd Ad listing
« Reply #1 on: April 12, 2019, 11:48:18 AM »
change $c == 3 into $c % 6 == 0 ?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Darwazo

  • ***
  • 81 posts
Re: Ads between Search Listing - After Every 3rd Ad listing
« Reply #2 on: April 12, 2019, 01:08:46 PM »
Thanks Frosticek....that worked !!

But why ads do not appear on 2nd / 3rd page of search results ?

*

MB Themes

Re: Ads between Search Listing - After Every 3rd Ad listing
« Reply #3 on: April 12, 2019, 02:06:08 PM »
@Darwazo
If you reload via ajax search, it will not generated adsense.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Darwazo

  • ***
  • 81 posts
Re: Ads between Search Listing - After Every 3rd Ad listing
« Reply #4 on: April 13, 2019, 12:02:05 AM »
thanks got it....
but Ads are working on mobile version?...