php - How to Insert an advert banner for every third Slide using JS Composer Slider

Hi I am working on my website andI want to ADD an ADVERT BANNER for every THIRD Post-Slider.I have previously used thi

Hi I am working on my website and I want to ADD an ADVERT BANNER for every THIRD Post-Slider.

I have previously used this code in a loop but it doesn't work the same for a SLIDER - Here is the Code I used previously on another website:

  if (in_category(37)) { 
    $post_counter++;
    if ($post_counter == 1 || $post_counter == 3) {

 ?>

Let me know if you have any ideas...

Hi I am working on my website and I want to ADD an ADVERT BANNER for every THIRD Post-Slider.

I have previously used this code in a loop but it doesn't work the same for a SLIDER - Here is the Code I used previously on another website:

  if (in_category(37)) { 
    $post_counter++;
    if ($post_counter == 1 || $post_counter == 3) {

 ?>

Let me know if you have any ideas...

Share Improve this question edited Oct 25, 2019 at 16:53 Aqeem Jones asked Oct 24, 2019 at 9:55 Aqeem JonesAqeem Jones 13 bronze badges 3
  • What is happening with this code? Are you getting an ad after 1 and 3? You should post the entire loop code. You should include the image directly into your question and provide more details about what is happening, etc. To get every 3rd you should use if ($post_counter % 3 == 0) – RiddleMeThis Commented Oct 24, 2019 at 13:29
  • It’s fine this QUESTION has been resolved and fixed on my side. Thank you . Apparently I had to edit the APP.min.js file . And now I can run ADVERTS via the slider. – Aqeem Jones Commented Oct 25, 2019 at 16:50
  • Great. Can you post that as an answer and then accept the answer so this question will be marked completed? – RiddleMeThis Commented Oct 25, 2019 at 18:34
Add a comment  | 

1 Answer 1

Reset to default 0

Thanks! Yes I edited the APP.min.JS file in order to show custom adverts on the Jcomposer Page builder...

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744988194a4604739.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信