Meks Easy Photo Feed Widget Shortcode

Below, you’ll find a detailed guide on how to add the Meks Easy Photo Feed Widget Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Meks Easy Photo Feed Widget Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Meks Easy Photo Feed Widget Plugin and the shortcodes it provides:

Plugin Icon
Meks Easy Photo Feed Widget

"Meks Easy Photo Feed Widget is a WordPress plugin that effortlessly integrates your Instagram photo feed into your website. Enhance your site's visuals with ease and style."

★★★★✩ (11) Active Installs: 30000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [meks_easy_photo_feed]

Meks Easy Photo Feed Widget [meks_easy_photo_feed] Shortcode

The Meks Easy Instagram Widget shortcode allows you to display your Instagram photo feed on your site. It provides customization options including title, username, number of photos, columns, photo space, container size, and link text.

Shortcode: [meks_easy_photo_feed]

Parameters

Here is a list of all possible meks_easy_photo_feed shortcode parameters and attributes:

  • title – Sets the title of the Instagram photo feed.
  • username – Specifies the Instagram username to show photos from.
  • photos_number – Determines the number of photos to display (default is 12).
  • columns – Sets the number of columns to display the photos in (default is 3).
  • photo_space – Defines the space between photos in pixels (default is 2).
  • container_size – Sets the size of the container holding the photos (default is 300).
  • link_text – Customizes the text for the link to the Instagram account.

Examples and Usage

Basic example – A shortcode that displays photos from a specified Instagram username with default parameters.

[meks_easy_photo_feed username='your_instagram_username']

Advanced example 1 – A shortcode that displays 6 photos from a specified Instagram username in 2 columns, with a photo space of 5, a container size of 500 and a custom title.

[meks_easy_photo_feed username='your_instagram_username' photos_number=6 columns=2 photo_space=5 container_size=500 title='My Instagram Feed']

Advanced example 2 – A shortcode that displays 8 photos from a specified Instagram username in 4 columns, with a photo space of 3, a container size of 400, a custom title, and a custom link text.

[meks_easy_photo_feed username='your_instagram_username' photos_number=8 columns=4 photo_space=3 container_size=400 title='My Instagram Feed' link_text='View More Photos']

PHP Function Code

In case you have difficulties debugging what causing issues with [meks_easy_photo_feed] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'meks_easy_photo_feed', 'meks_shortcode_easy_photo_feed' );

Shortcode PHP function:

function meks_shortcode_easy_photo_feed( $atts ) {

	$atts = shortcode_atts(
		array(
			'title'          => '',
			'username'       => '',
			'photos_number'  => 12,
			'columns'        => 3,
			'photo_space'    => 2, 
			'container_size' => 300,
			'link_text'      => '',
		),
		$atts
	);

	ob_start();

	the_widget(
		'Meks_Instagram_Widget',
		array(
			'title'            => $atts['title'],
			'username_hashtag' => $atts['username'],
			'photos_number'    => $atts['photos_number'],
			'columns'          => $atts['columns'],
			'photo_space'      => $atts['photo_space'],
			'container_size'   => $atts['container_size'],
			'link_text'        => $atts['link_text'],
		)
	);

	$output = ob_get_contents();
	ob_end_clean();

	return $output;

}

Code file location:

meks-easy-instagram-widget/meks-easy-instagram-widget/inc/template-functions.php

Conclusion

Now that you’ve learned how to embed the Meks Easy Photo Feed Widget Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *