Meteor Slides Shortcode

Below, you’ll find a detailed guide on how to add the Meteor Slides 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 Meteor Slides Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Meteor Slides Plugin and the shortcodes it provides:

Plugin Icon
Meteor Slides

"Meteor Slides is a powerful WordPress plugin designed to create and manage beautiful, responsive slide shows. Its intuitive interface allows for easy customization of slide speed and transition effects."

★★★★☆ (129) Active Installs: 20000+ Tested with: 6.1.4 PHP Version: false
Included Shortcodes:
  • [meteor_slideshow]

Meteor Slides [meteor_slideshow] Shortcode

The Meteor Slideshow shortcode allows you to display a specific slideshow on your WordPress site. The shortcode extracts the ‘slideshow’ and ‘metadata’ attributes from the shortcode, which are then used to generate the slideshow content. It starts an output buffer, calls the ‘meteor_slideshow’ function with the extracted attributes, and stores the generated HTML content. Finally, it returns the content to be displayed on the site.

Shortcode: [meteor_slideshow]

Parameters

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

  • slideshow – Specifies the slideshow to display
  • metadata – Additional data related to the slideshow

Examples and Usage

Basic example – Displays a default meteor slideshow without any specific slideshow or metadata parameters.

[meteor_slideshow /]

Advanced examples

Displays a specific meteor slideshow by referencing its name. The slideshow will load based on the name provided.

[meteor_slideshow slideshow="my-slideshow" /]

Displays a meteor slideshow with specified metadata. The slideshow will load with the defined metadata attributes.

[meteor_slideshow metadata="height:500,width:500" /]

Displays a specific meteor slideshow by referencing its name and with specified metadata. The slideshow will load based on the name and the defined metadata attributes.

[meteor_slideshow slideshow="my-slideshow" metadata="height:500,width:500" /]

PHP Function Code

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

Shortcode line:

add_shortcode( 'meteor_slideshow', 'meteor_slideshow_shortcode' );

Shortcode PHP function:

function meteor_slideshow_shortcode( $meteor_atts ) {
	
		extract( shortcode_atts( array (
		
			'slideshow' => '',
			'metadata'  => '',
			
		), $meteor_atts ) );
		
		$slideshow_att = $slideshow;
		
		$metadata_att = $metadata;
	
		ob_start();
		
		meteor_slideshow( $slideshow=$slideshow_att, $metadata=$metadata_att );
		
		$meteor_slideshow_content = ob_get_clean();
		
		return $meteor_slideshow_content;
	
	}

Code file location:

meteor-slides/meteor-slides/meteor-slides-plugin.php

Conclusion

Now that you’ve learned how to embed the Meteor Slides 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 *