Docs    Facebook    Documentation

Filtering your Facebook posts

Plugin Version 4.0 and above

The Custom Facebook Feed plugin has a filtering feature built into it which allows you to filter your posts by a specific string, word, or hashtag. You can set this for your feed by going to Facebook Feed > All Feeds > select Edit for the relevant feed > Settings > Filters. 

Here, you can edit the filtration settings for your feed.

Filtration settings screen

If you are not seeing all the expected results after filtration

It’s important to note that this filtering occurs after the posts have been returned from Facebook, as their API doesn’t allow us to request posts that contain only certain keywords, and so you would need to set the number of posts to be high enough that a larger batch of posts is retrieved from Facebook. This then gives the plugin more posts to filter through in order to find ones that contain your word/hashtag. You can adjust the number of posts that the plugin requests from Facebook’s API by using the ‘Post Limit’ setting, found in the feed options > Settings > Advanced. You can adjust this to a maximum of 100, as this is the limit of the Facebook API. It is advised not to set it higher than what is needed as you will end up requesting more posts than you need to display, increasing initial page load time.

If you are filtering group posts, keep in mind that the Facebook API only sends posts made in the last 90 days, so if these posts are not previously cached they will not show up after filtering out other posts.

If you’d like to remove the hashtag from your post so that it isn’t visible, then you can add the following JavaScript to your site. This can be done manually using a custom JavaScript plugin. For further information see our documentation here.

$('.cff-item').each(function(){
  $(this).find('.cff-text').html( $(this).find('.cff-text').html().replace("#put_hashtag_here", "") );
});

You would need to replace the “#put_hashtag_here” with your actual hashtag. Important: This is case-sensitive.

Filtering by multiple keywords 

You can specify multiple keywords using the plugin’s Filter feature by separating the keywords by commas, however, this setting works similar to an OR operator, rather than an AND operator, and so will display posts that contain any of the specified keywords.

Below Plugin Version 4.0

The Custom Facebook Feed plugin has a post filtering feature built into it which allows you to filter your posts by a specific string or hashtag. You can set this for all feeds by using the setting on the plugin’s Customize page in the following location: Facebook Feed > Customize > General > Filter Content by String. To set a filter for an individual feed, simply use the “filter” shortcode option, like so:

Comments Box SVG iconsUsed for the like, share, comment, and reaction icons
Load more
.

It’s important to note that this filtering occurs after the posts have been returned from Facebook, as their API doesn’t allow us to request posts which contain only certain keywords, and so you would need to set the number of posts to be high enough that a larger batch of posts is retrieved from Facebook. This then gives the plugin more posts to filter through in order to find ones which contain your word/hashtag. You can adjust the number of posts that the plugin requests from Facebook’s API by using the ‘Post Limit’ setting, which is on the plugin’s main Settings page, or you can set it individually in each shortcode by using the ‘limit’ setting, like so:

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

2 months ago

Smash Balloon

We're celebrating our rebranding and website relaunch with a huge Launch Party this week! Enter to win a pair of AirPods Pro for FREE and get huge discounts of up to 65% off our plugins! smashballoon.com/sale/

Each sale will also help support Save the Children, an amazing charity which helps children in need all around the world.
... See MoreSee Less

Were celebrating our rebranding and website relaunch with a huge Launch Party this week! Enter to win a pair of AirPods Pro for FREE and get huge discounts of up to 65% off our plugins! https://smashballoon.com/sale/

Each sale will also help support Save the Children, an amazing charity which helps children in need all around the world.

Comment on Facebook

One of my emails, in a back and forth to this company, to ask questions about a product, before I actually buy it. The absurdity? By now, it would have been far easer just to ... errr. call me. Welcome to tech sales in the new generation: First tip? Banish the "I am sorry you feel that way" from your lexicon. You sound like Verizon customer service. Not the highly educated individual I presume I am dealing with. That is the perfect passive aggressive non answer that is all the rage in the '20s.. You aren't really apologizing, you just feel badly that in some form, i may feel hurt. I haven't purchased your product. As a self-employed journalist, for whom budget decisions always loom large, i avoid purchases from companies that are incapable of basic human interaction Let's see how this movie goes: I email you a few questions, you respond. That immediately triggers follow up questions, which I in turn ask of you. A Day or so later, we may have resolution. Or, 5 min of actually engaging in a back & forth, and you get a credit card. Sadly, tech companies are far more enamored of the method of information delivery, than results. I'm sure many deal with your company, based on the absence of any alternative. What would be a far more interesting analysis? How many consumers simply, when met with this "form of communication", simply walked away. BTW, my hosting provider, Blue Host, has actual trained sales people on the line.(Gasp! How positively 1990's of them!) As a result of exactly two brief (verbal) conversations, I have purchased a hosting package, as well as paid support.

I'm an existing customer with an All Access bundle. can I get 65% off renewal? it's due on the 29th March

3 months ago

Smash Balloon

We have a new balloon to smash!

After 9 years it was time for a refresh! Our new logo is clean and simple, just like our plugins.
... See MoreSee Less

We have a new balloon to smash!

After 9 years it was time for a refresh! Our new logo is clean and simple, just like our plugins.

3 months ago

Smash Balloon

Like saving time? We’ve been listening to your feedback, and our new Feed Templates feature makes it much quicker and easier to get started creating your perfect feed! Just select a template with one click and let us do the work for you.

Update to v4.2 of the Custom Facebook Feed Pro plugin to use this new feature, and find out more details here: smashballoon.com/facebook-feed-templates-update/
... See MoreSee Less

Like saving time? We’ve been listening to your feedback, and our new Feed Templates feature makes it much quicker and easier to get started creating your perfect feed! Just select a template with one click and let us do the work for you.

Update to v4.2 of the Custom Facebook Feed Pro plugin to use this new feature, and find out more details here: https://smashballoon.com/facebook-feed-templates-update/

4 months ago

Smash Balloon

Say hello to Instagram Feed 6!

Our biggest update to the plugin yet, with a brand new admin interface. We've redesigned the user experience from the ground up for simplicity, making it way easier to create, manage, and customize your feeds.

- See and edit all your feeds in one place (no more pesky shortcode options!)
- A brand new feed customizer with live feed preview.
- Redesigned settings pages to make it easier to find things.
- Easy color scheme settings to change all your colors in one place.
- Better Shoppable Feeds, import/export settings, and much more!

Check out our announcement post on our blog for more info:
smashballoon.com/new-update-instagram-feed-6/
... See MoreSee Less

Say hello to Instagram Feed 6!

Our biggest update to the plugin yet, with a brand new admin interface. Weve redesigned the user experience from the ground up for simplicity, making it way easier to create, manage, and customize your feeds.

- See and edit all your feeds in one place (no more pesky shortcode options!)
- A brand new feed customizer with live feed preview.
- Redesigned settings pages to make it easier to find things.
- Easy color scheme settings to change all your colors in one place.
- Better Shoppable Feeds, import/export settings, and much more!

Check out our announcement post on our blog for more info:
https://smashballoon.com/new-update-instagram-feed-6/

Comment on Facebook

Broke my feed. Shows my photo, bio and follow button but no actual images. Just a blank area. It was working fine for months before this!

its not showing any pictures with the new update using the divi theme builder did all that it says to do on your knowledge base.

Hey guys! I am a social media professional, and I would like to mention about Rannkly, a powerful social media tool that I recently stumbled upon. And well let me tell you that it is a lot better than Buffer.@https://www.facebook.com/reputationmanagement/

5 months ago

Smash Balloon

We're turning Green Monday blue this year, and running a huge sale with deals of up to 65% off in support of the Ocean Conservancy who help to protect and clean the world's oceans.

This deal is for one day only, so claim yours and help support a great cause at the same time: smashballoon.com/sale/
... See MoreSee Less

Were turning Green Monday blue this year, and running a huge sale with deals of up to 65% off in support of the Ocean Conservancy who help to protect and clean the worlds oceans.

This deal is for one day only, so claim yours and help support a great cause at the same time: https://smashballoon.com/sale/

6 months ago

Smash Balloon

Forget Black Friday, it's SMASH Friday!

We're thankful for all of our 1,600,000+ users who choose to use our plugins to power their social media feeds. To show our appreciation, we're offering up to 65% off all our plugins for Facebook, Instagram, Twitter, and YouTube.

Grab your deal now before it expires: smashballoon.com/black-friday/
... See MoreSee Less

Forget Black Friday, its SMASH Friday!

Were thankful for all of our 1,600,000+ users who choose to use our plugins to power their social media feeds. To show our appreciation, were offering up to 65% off all our plugins for Facebook, Instagram, Twitter, and YouTube.

Grab your deal now before it expires: https://smashballoon.com/black-friday/

Comment on Facebook

Hello! I've bought your facebook plugin, but it doesn't work correctly. I stream posts from my facebook page to my site, and if post contains several photos, only the first one shows at lightbox. If I click the next button, I see the photo from next post. But I presume that the next picture from this post have to be shown. How to fix it?

I've just bought your facebook pugin to show a facebook group i run, but it is not working. The group is private and i have all the relevent tokens

Load more
. The maximum number of posts you can retrieve from Facebook per shortcode is 100, as this is the limit of their API. It is advised not to set it higher than is needed as you will end up requested more posts than you need to display.

If you’d like to remove the hashtag from your post so that it isn’t visible, then you can add the following to the plugin’s “Custom JavaScript” section (Customize > Misc > Custom JavaScript):

$('.cff-item').each(function(){
  $(this).find('.cff-text').html( $(this).find('.cff-text').html().replace("#put_hashtag_here", "") );
});

You would need to replace the “#put_hashtag_here” with your actual hashtag. Important: This is case-sensitive.

Filtering by multiple keywords

You can specify multiple keywords using the plugin’s “Filter” feature by separating the keywords by commas, however, this setting works similar to an OR operator, rather than an AND operator, and so will display posts which contain any of the specified keywords, not posts which only contain all of them. However, it is possible to filter the posts a second time using JavaScript so that only posts which contain two words or hashtags are shown. To achieve this, you would do the following:

1) Set the filter in the shortcode:

Comments Box SVG iconsUsed for the like, share, comment, and reaction icons
Load more

2) Add a class to the shortcode so that we can target it uniquely in the JavaScript snippet:

Comments Box SVG iconsUsed for the like, share, comment, and reaction icons
Load more

3) Add the following to the plugin’s Custom JavaScript setting (Customize > Misc > Custom JavaScript):

$('.feed1 .cff-item').each(function(){ 
  if( $(this).find('.cff-text').text().toLowerCase().indexOf("word2") < 0 ) $(this).remove();
});

This JavaScript snippet should loop through all of the posts which are in your feed and remove those which don’t contain the string “word2”. Note that you have to include the class of the feed you are targeting in the first line of the snippet.

You can then repeat this for the other feeds by duplicating the JavaScript snippet and changing the class and word in the snippet.

support

Couldn’t find your answer in the docs?

Contact Support