Docs    Facebook    Customizations

Insert your own content every X number of posts

Add ads or content in between your Facebook posts.

var number_of_posts = 5,
    content_to_add = 'Add content here',
    i = 1;
$('#cff .cff-item').each(function(){
  if( i % number_of_posts == 0 ) $(this).after('<div class="cff-item">'+content_to_add+'</div>');
  i++;
});

Edit the variables on the first two lines to define how many posts to insert the content after and what content should be added. The content can be text or HTML.

If you need to only add the content to a specific feed then you can add a class to the shortcode:

Comments Box SVG iconsUsed for the like, share, comment, and reaction icons
1 month ago

Are your Instagram posts feeling like they're shouting into the void?

You might be posting at the WRONG TIME! 😱

Our brand new YouTube video breaks down the BEST TIMES TO POST ON INSTAGRAM IN 2025! 🚀

👉 WATCH NOW and unlock the secrets to perfect Instagram timing: www.youtube.com/watch?v=bQbVH_RcOJA 👈

In this must-watch video, you'll learn:

- Proven time slots to capture the most attention on Instagram
- How to find YOUR audience's peak activity times using Instagram Insights (it's easier than you think!)
- And, most importantly, how ClickSocial can make scheduling your posts for the perfect time effortless! 😉
... See MoreSee Less

Video image

0 CommentsComment on Facebook

5 months ago

⚡️ Cyber Monday EXTENDED! ⚡️

Our Cyber Monday sale was so popular, we're extending it until Friday! Get up to 70% off Smash Balloon's top-tier social media feed plugins.

👉 smashballoon.com/black-friday/👈

With a premium Smash Balloon plan, you can:
- Engage visitors with bite-sized TikTok video feeds
- Supercharge Instagram growth with beautiful galleries and Instagram reels
- And more!

👉 smashballoon.com/black-friday/👈

This limited-time offer expires THIS FRIDAY, December 6th, 2024, at 11:59 PM EST. Don't miss out! This is a BIG discount, and we're not sure when (or if) we'll ever offer it again.
... See MoreSee Less

⚡️ Cyber Monday EXTENDED! ⚡️

Our Cyber Monday sale was so popular, were extending it until Friday! Get up to 70% off Smash Balloons top-tier social media feed plugins.

👉 https://smashballoon.com/black-friday/👈

With a premium Smash Balloon plan, you can:
- Engage visitors with bite-sized TikTok video feeds
- Supercharge Instagram growth with beautiful galleries and Instagram reels
- And more! 

👉 https://smashballoon.com/black-friday/👈

This limited-time offer expires THIS FRIDAY, December 6th, 2024, at 11:59 PM EST. Dont miss out! This is a BIG discount, and were not sure when (or if) well ever offer it again.
6 months ago

🎬 Want to easily embed YouTube videos on your website with visible time length and duration?

Embedding YouTube videos is a fantastic way to keep your visitors engaged and turn them into loyal customers. But it can be tricky to do manually, especially if you want to display video lengths. 🤔

Discover how you can quickly and effortlessly embed YouTube videos on your WordPress site using the YouTube Feed Pro plugin by Smash Balloon. No coding required! 🙌

Dive into our step-by-step guide and start embedding amazing YouTube content today!

👉
... See MoreSee Less

Video image

0 CommentsComment on Facebook

Load more

And then target that feed in the fourth line of the snippet above:

$('.feed1 .cff-item').each(function(){

To add different content in every X number of posts you can use the following:

var number_of_posts = 5,
    content_to_add = [
    'Content 1',
    'Content 2',
    'Content 3'
    ],
    i = 1,
    count = 0;
$('#cff .cff-item').each(function(){
   if( i % number_of_posts == 0 && count < content_to_add.length ){
     $(this).after('<div class="cff-item">'+content_to_add[count]+'</div>');
     count++;
   }
   i++;
});
support

Couldn’t find your answer in the docs?

Contact Support

Was this article helpful?