New Video Gallery Shortcode

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

Before starting, here is an overview of the New Video Gallery Plugin and the shortcodes it provides:

Plugin Icon
Video Gallery – Api Gallery, YouTube and Vimeo, Link Gallery

"Video Gallery – Api Gallery, YouTube and Vimeo, Link Gallery is a versatile plugin. It effortlessly curates & displays video content from YouTube, Vimeo, and other links, enhancing your WordPress site's multimedia experience."

★★★★✩ (8) Active Installs: 3000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [VDGAL]

New Video Gallery [VDGAL] Shortcode

The Video Gallery shortcode is a function that helps display a video gallery on your WordPress site. It works by calling ‘awl_video_gallery_shortcode’ function which requires ‘video-gallery-code.php’.

Shortcode: [VDGAL]

Examples and Usage

Basic example – The shortcode ‘VDGAL’ displays a video gallery using the post ID as a parameter.

[VDGAL post_id=1 /]

Advanced examples

Using the shortcode to display a video gallery by referencing the post ID. The video gallery will load using the specific post ID.

[VDGAL post_id=2 /]

Using the shortcode to display multiple video galleries by referencing multiple post IDs. The video galleries will load using the specific post IDs.

[VDGAL post_id=1,2,3 /]

Please note that the post IDs must be separated by commas without spaces in between. The video galleries will be displayed in the order of the post IDs specified in the shortcode.

PHP Function Code

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

Shortcode line:

add_shortcode( 'VDGAL', 'awl_video_gallery_shortcode' );

Shortcode PHP function:

function awl_video_gallery_shortcode( $post_id ) {
	ob_start();

	// output code file
	require 'video-gallery-code.php';

	return ob_get_clean();
}

Code file location:

new-video-gallery/new-video-gallery/include/shortcode.php

Conclusion

Now that you’ve learned how to embed the New Video Gallery 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 *