Docs    Instagram    Documentation

Hide photos which contain a specific word or hashtag

Version 6.0

You can easily display posts from an Instagram account that contain certain hashtags by using the setting labeled ‘Do not show post containing’ which can be found in the following location: Instagram Feed > All Feeds > Feed Settings (pencil icon) > Settings tab > Filters and Moderation. The plugin will then hide any posts which contain those words or hashtags.

Below version 6.0

You can easily display posts from a user account which contain certain hashtags by using the setting labeled ‘Remove photos containing these words or hashtags’ which can be found in the following location: Instagram Feed > Customize > Moderation.  The plugin will then hide any posts which contain those words or hashtags.

You can also specify words or hashtags for individual feeds by using the shortcode option; excludewords. For example:

[instagram-feed excludewords="bad, #words"]

Below version 2.0

You can hide photos which contain a specific word or hashtag by adding the following snippet to the plugin’s Custom JavaScript section, which is on the plugin’s Customize page:

var excludeWords = ['smash','balloon','is','#awesome'];

$('.sbi_item').each(function(){
 var $item = $(this), 
  caption = $item.find('.sbi_photo img').attr('alt');
 $.each( excludeWords, function( index, entry ) {
  if( caption.toLowerCase().indexOf(entry) > -1 ) $item.remove();
 });
});

You would need to replace the word in the first line with any words which you want to use:
var excludeWords = ['hide','posts','with','these words'];

support

Couldn’t find your answer in the docs?

Contact Support