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
1 Answer
Reset to default 0Thanks! Yes I edited the APP.min.JS file in order to show custom adverts on the Jcomposer Page builder...