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

Smash Balloon

🔥 5 Hacks to Get Real Instagram Followers (Fast)

Want to grow your Instagram account faster this 2024?

In this video, we’ll show you how to increase Instagram followers with 5 of our secret tips and tricks.

... See MoreSee Less

Video image

Comment on Facebook

4 months ago

Smash Balloon

To celebrate Cyber Monday, you can get up to 70% off your Smash Balloon plan today!🔥

👉 smashballoon.com/black-friday/

Act fast! Save big on your favorite social media feed plugin TODAY while it’s on sale.

👉 smashballoon.com/black-friday/
... See MoreSee Less

To celebrate Cyber Monday, you can get up to 70% off your Smash Balloon plan today!🔥

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

Act fast! Save big on your favorite social media feed plugin TODAY while it’s on sale. 

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

4 months ago

Smash Balloon

Our BIGGEST sale of the year is ON! 🔥

👉 smashballoon.com/black-friday/

Black Friday came early, and you know what this means?

Now, you can score HUGE discounts on all Smash Balloon plugins so you can easily show social media feeds on your sites!

Don’t miss out.

Get your favorite social media feed plugin TODAY while it’s on sale, before it’s too late!

👉 smashballoon.com/black-friday/
... See MoreSee Less

Our BIGGEST sale of the year is ON! 🔥

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

Black Friday came early, and you know what this means?

Now, you can score HUGE discounts on all Smash Balloon plugins so you can easily show social media feeds on your sites! 

Don’t miss out. 

Get your favorite social media feed plugin TODAY while it’s on sale, before it’s too late!

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

Comment on Facebook

Hi! Does any of this apply to me as an exsiting customer? Lets say if I renew any licens I have earlier than needed?

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?