Hide / Block photos from a certain username

Version 2.0 and above

Using moderation mode (version 2.4 and above)

To use a visual interface for blocking users on the front-end of your site, log in as an admin and enable moderation mode on the “Customize” tab or by adding this to the shortcode
[instagram-feed moderationmode=true]

You can now click the orange “Moderation Mode” button that is added to the top of the feed.

Guide to Moderation Mode

Manually

You can block photos from certain users being displayed in your feed by just adding their username to the plugin’s ‘Block users’ setting, which is in the following location: Instagram Feed > Customize > Moderation > Block users

block-users

Less than version 2.0

If you want to hide photos in your Instagram feed from particular users then you can do so by using the snippet below. Just add the following to the plugin’s Custom JavaScript section, which is under the Misc tab on the plugin’s Customize page, and change the “username_1”, “username_2” and “username_3” text to the usernames that you want to hide photos from. Please note that you have to add the username and not the user’s full name.

$('.sbi_item').each(function(){
 var username = $(this).find('.sbi_username a').text();
 if( username == "username_1" || username == "username_2" || username == "username_3" ) $(this).remove();
});

You can add or remove usernames from the snippet by just removing the || username == "username_3" text. For example:

$('.sbi_item').each(function(){
 var username = $(this).find('.sbi_username a').text();
 if( username == "username_1" || username == "username_2" ) $(this).remove();
});

Or you can more by adding that text:

$('.sbi_item').each(function(){
 var username = $(this).find('.sbi_username a').text();
 if( username == "username_1" || username == "username_2" || username == "username_3" || username == "username_4" ) $(this).remove();
});