Social Slider Feed Shortcodes

Below, you’ll find a detailed guide on how to add the Social Slider Feed Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Social Slider Feed Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Social Slider Feed Plugin and the shortcodes it provides:

Plugin Icon
Social Slider Feed

"Social Slider Feed is a versatile plugin that allows you to smoothly integrate your Instagram content into your WordPress site. This widget is perfect for showcasing your social media activity."

★★★★✩ (120) Active Installs: 60000+ Tested with: 6.1.4 PHP Version: 7.0
Included Shortcodes:
  • [cm_facebook_feed]
  • [jr_instagram]
  • [cm_youtube_feed]

Social Slider Feed [cm_facebook_feed] Shortcode

The Instagram Slider Widget shortcode is a tool that fetches and displays Facebook feeds. The ‘cm_facebook_feed’ shortcode uses the ‘WIS_Feeds’ class to retrieve feeds from Facebook. It requires an ‘id’ attribute to identify the specific feed. If the feed exists, it displays the images.

Shortcode: [cm_facebook_feed]

Parameters

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

  • id – Unique identifier for the specific Facebook feed

Examples and Usage

Basic Example – Displaying a Facebook feed by referencing the ID

[cm_facebook_feed id=1 /]

Advanced Examples

Displaying a Facebook feed by referencing the ID. If the feed with the specified ID is not found, the shortcode will return an empty string.

[cm_facebook_feed id=2 /]

Displaying a Facebook feed by referencing a non-existing ID. Since there’s no feed with the specified ID, the shortcode will return an empty string.

[cm_facebook_feed id=999 /]

PHP Function Code

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

Shortcode line:

add_shortcode( 'cm_facebook_feed', 'cm_facebook_feed_shortcode' );

Shortcode PHP function:

function cm_facebook_feed_shortcode( $atts ) {
	$atts = shortcode_atts( [ 'id' => '' ], $atts, 'cm_facebook_feed' );

	$feeds = new WIS_Feeds( 'facebook' );
	$feed  = $feeds->get_feed( $atts['id'] );

	if ( $feed ) {
		return $feed->display_images();
	}

	return "";
}

Code file location:

instagram-slider-widget/instagram-slider-widget/components/facebook/includes/functions.php

Social Slider Feed [jr_instagram] Shortcode

The Instagram Slider Widget shortcode, ‘jr_instagram’, fetches and displays Instagram images. The shortcode is customizable with an ‘id’ attribute that specifies the Instagram feed to display. The images are then returned and displayed. If the feed is not found, it returns an empty string.

Shortcode: [jr_instagram]

Parameters

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

  • id – Specifies the unique identifier of the Instagram feed

Examples and Usage

Basic example – Displays Instagram feed by referencing the ID of the feed.

[jr_instagram id=1 /]

Advanced examples

Displaying Instagram feed by referencing both ID and title. The feed will first try to load by ID, but if not found, it will try to load by title.

[jr_instagram id=1 title="My Instagram Feed" /]

Displaying Instagram feed by referencing ID and setting the number of images to display. If the number of images is not found or exceeds the total number of images in the feed, it will display all images.

[jr_instagram id=1 num=10 /]

Displaying Instagram feed by referencing ID and setting the layout to grid. The layout can be set to grid, list, or carousel.

[jr_instagram id=1 layout="grid" /]

Please note that these are hypothetical examples as the actual shortcode does not support these parameters (title, num, layout). They are merely to illustrate how one might use additional parameters if they were available.

PHP Function Code

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

Shortcode line:

add_shortcode( 'jr_instagram', 'jr_instagram_shortcode' );

Shortcode PHP function:

function jr_instagram_shortcode( $atts ) {
	$atts = shortcode_atts( [ 'id' => '' ], $atts, 'jr_instagram' );

	$feeds = new WIS_Feeds( 'instagram' );
	$feed  = $feeds->get_feed( $atts['id'] );

	if ( $feed ) {
		return $feed->display_images();
	}

	return "";
}

Code file location:

instagram-slider-widget/instagram-slider-widget/components/instagram/includes/functions.php

Social Slider Feed [cm_youtube_feed] Shortcode

The Instagram Slider Widget shortcode, ‘cm_youtube_feed’, displays YouTube feeds on your website. It fetches the YouTube feed based on the ID provided. It uses the WIS_Feeds class to retrieve and display the videos. If no feed is found for the given ID, it returns an empty string.

Shortcode: [cm_youtube_feed]

Parameters

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

  • id – Specifies the unique identifier of the YouTube feed

Examples and Usage

Basic example – The following shortcode is a simple example which utilizes the ‘cm_youtube_feed’ shortcode to display a YouTube feed. The ‘id’ attribute is used to specify the particular feed that you want to display.

[cm_youtube_feed id=1 /]

Advanced examples

In the following example, the ‘cm_youtube_feed’ shortcode is used to display multiple YouTube feeds. This is achieved by specifying multiple ‘id’ attributes within the shortcode. Each ‘id’ attribute corresponds to a different YouTube feed. Note that the ‘id’ attributes are separated by commas.

[cm_youtube_feed id=1,2,3 /]

Another advanced usage of the ‘cm_youtube_feed’ shortcode is to display a YouTube feed with a specific layout. This is achieved by adding the ‘layout’ attribute to the shortcode. The value of the ‘layout’ attribute determines the layout of the displayed feed.

[cm_youtube_feed id=1 layout="grid" /]

PHP Function Code

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

Shortcode line:

add_shortcode( 'cm_youtube_feed', 'cm_youtube_feed_shortcode' );

Shortcode PHP function:

function cm_youtube_feed_shortcode( $atts ) {
	$atts = shortcode_atts( [ 'id' => '' ], $atts, 'cm_youtube_feed' );

	$feeds = new WIS_Feeds( 'youtube' );
	$feed  = $feeds->get_feed( $atts['id'] );

	if ( $feed ) {
		return $feed->display_videos();
	}

	return "";
}

Code file location:

instagram-slider-widget/instagram-slider-widget/components/youtube/includes/functions.php

Conclusion

Now that you’ve learned how to embed the Social Slider Feed Plugin shortcodes, 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 *