Docs    Facebook    Customizations

Remove a particular string or hashtag from the post text

If you’re using a hashtag to filter posts (eg: #showonwebsite) then you may not want that hashtag to show up in your feed. You can use the following snippet to remove a particular string or hashtag.

Just add the following to the plugin’s “Custom JavaScript” section (Facebook Feed > Customize > Misc):

$('#cff .cff-item').each(function(){
  var $self = $(this),
    str = $self.find('.cff-text').html();
  
  if( typeof str !== 'undefined' ) $self.find('.cff-text').html( str.replace("#myhashtag", "") );
});

To remove multiple hashtags, just add more as shown below:

$('#cff .cff-item').each(function(){
  var $self = $(this),
    str = $self.find('.cff-text').html();
  
  if( typeof str !== 'undefined' ) $self.find('.cff-text').html( str.replace("#hashtag1", "").replace("#hashtag2", "").replace("#hashtag3", "") );
});

Technical Support

Still have questions? We are here to help you succeed.

Open a support ticket