To display shortcodes in widgets , use a regular text widget, and add this line to your theme’s functions.php file:
// Use shortcodes in text widgets.
add_filter('widget_text', 'do_shortcode');
This tells WordPress to render the shortcodes in widgets.
and if you want to call your shortcode by php you can use do_shortcode() function
// Use shortcode in a PHP file (outside the post editor).
do_shortcode('
');
To get a better understanding of shortcodes check out this tutorial which covers: What shortcodes are, How to use shortcodes, ,How to define your own. and How to use them in widgets.
Hope this helps
Related Posts:
- Generating Thumbnails for video
- Managing and Playing Large videos
- WordPress 3.1: Videoplayer implemented?
- oEmbed vimeo with add_query_arg parameters not inserted to HTML
- Add video from youtube in post
- Vimeo videos not working
- Adding a video description in a similar way to a image caption
- Best Practices for Video Uploads to WordPress
- How to use the new wp_read_video_metadata function
- oEmbed not working in WordPress
- How to play amazon S3 videos in wordpress 3.6?
- Viddler oEmbed not working with specified width
- How to create thumbnails in wordpress with jwplayer
- Problem with JWplayer. Video is missing?
- WordPress 3.6 Video shortcodes in template
- How to play a video without using plugin?
- How to embed local video in a wordpress post
- Adding video to a WordPress website [closed]
- tags disappear on pages (but not on posts!)
- Are self-hosted videos a good idea? [closed]
- How to add a download link to a video from WP media library?
- Optimal method for organizing videos by topics discussed?
- Uploaded video store in video folder
- How do I add “live thumbnails” or slideshow like thumbnails?
- WordPress 5.2.1: Embed video is not working. Showing video link on fronted
- Problem with video url from ad manager
- Cant play videos
- Slider Revolution video on autoplay doesn’t start
- Video link not working in Internet Explorer
- Hide video & make a clickable play button icon on header
- Different custom header video on different pages
- Update a Post after a user uploads a video
- mp4 video preview
- Page will only display first 6 videos
- Find Videos Inside a Post
- How to fetch all videos in custom page which uploaded in wp-admin (Media) in wordpress
- How to Insert Self-Hosted Video in WordPress Post
- Videos in posts are not rendered
- Resizing built-in wordpress video not working! [closed]
- Remove lines in video
- Strange video appears in background on Safari only [closed]
- Video header works only on previews, but not on published pages
- videojs – No compatible source was found for this media in wordpress app
- My website suddenly won’t play any videos
- Setting a post’s featured image from an embedded YouTube video
- Do_Shortcode not working for Embed
- Get first video from the post (both embed and video shortcodes)
- Replace audio/video enclosure with player?
- Implementing “Video of the Day” Feature?
- Make a video post redirect to next post after completion
- getting video dimensions
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- Videos via the video shortcode are always 640px wide?
- Show Video in Excerpt
- How to add new embed handler not supported by oembed
- How to handle valueless attributes in shortcodes?
- How to overwrite youtube embed?
- WP REST – video and audio players
- Protecting HTML5 video [closed]
- How can I get the [video] shortcode to allow query string parameters?
- How do I control video media display sizing with native wordpress player
- How to Replace the WordPress Featured Image with a Video?
- how to add new .webm mime types
- Should I use custom post types for a front page video feature (vimeo)?
- How can I use a video header that’s over 8MB?
- How to generate a featured image from a video embeded in a metabox
- Displaying all Video Post Formats to Page
- how to use preg_replace for wordpress video?
- Use Video as Featured Image
- How to get Poster (thumbnail) Image of Video
- wp_insert_post iframe missing
- Escaping Quotes
- Getting a thumbnail for an external video as the thumbnail for a custom post type?
- How to check If Oembed is empty or not
- Embed YouTube video from custom field value
- disable video URL auto-embedding for a part of the post
- Video shortcode – autoplay all videos
- Is there a built in function to see if a URLis oEmbed Compatible?
- How to allow html5 tag in WordPress
- How can I create a custom meta box to add an mp4 video to a page?
- Video Embed with Captions in Turkish
- Lightbox Plus ColorBox plugin and auto playing YouTube video
- How to generate video out of images via WordPress plugin
- How to add a download link to a movie from WP media library?
- How to import my YouTube channel into WordPress?
- Video Shortcodes not working in WordPress
- Responsive Video Max-width
- Extract an embedded video from the content
- WordPress get embedded/attachment video
- How to make a video play for homepage?
- Video uploaded with the native media uploader gives Error 404
- Adding Videos as post-thumbnails (no stills, just the player in a smaller size)
- change video icons to selected thumbnail?
- Linking an image to open a youtube video in lightbox/fancybox in wordpress
- How to auto embedded youtube with wp_insert_post()
- Why is my oembed function modifying Twitter embed?
- Custom Post Type Video – Online/Offline
- How to use format post in a pertinent way
- MP4 video on wordpress working on desktop, not on mobile devices
- How can I implement shortcode on click event