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
3 weeks ago

Need some inspiration for displaying your Instagram feed on your website? 🤔

Our YouTube video showcases stunning examples of Instagram feeds on websites, complete with tips and tricks to recreate the look! 🤩

From minimalist grids to eye-catching carousels, you're sure to find the perfect style for your brand! ✨

Get inspired here:
... See MoreSee Less

Video image

1 CommentComment on Facebook

Your Facebook Feed Pro plugin is showing the wrong times, and I sent a support request in, but don't know if it went through. After filing in all the fields and pressing the submit button nothing happens? Doesn't tell me if it's went through or not?

4 weeks ago

Want more Instagram followers? 🤔 Of course you do! 😉

We're sharing proven tips and tricks to boost your Instagram following organically in our video.

Learn how to:

Craft the perfect bio ✨
Create engaging content 📸
Use hashtags strategically #️
And much more! 🚀

Ready to grow your audience? Head to the video here:
... 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?