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
- 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
- How to add new embed handler not supported by oembed
- How can I use a video header that’s over 8MB?
- Displaying all Video Post Formats to Page
- Use Video as Featured Image
- Getting a thumbnail for an external video as the thumbnail for a custom post type?
- Embed YouTube video from custom field value
- How to allow html5 tag in WordPress
- Lightbox Plus ColorBox plugin and auto playing YouTube video
- Video Shortcodes not working in WordPress
- How to make a video play for homepage?
- 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?
- How to use format post in a pertinent way
- Video Security just like facebook [closed]
- ACF – Add/update featured image (for videos) by field [closed]
- How can I remove the first video from a post and feature it?
- videopress videos are not displayed when loading the content with ajax in a lightbox
- Upload iPhone video clips to blog via native WP app
- How to embed .mp4 videos in a WordPress post?
- Remove Custom Divs from AMP pages
- Query posts that contain video?
- Display video on homepage for users who have not logged in
- get video from content
- Let users sell video in my website [closed]
- How to change the settings of a video? [closed]
- TED talk embedded videos cut off by sidebar
- How to use the conditional homepage tag
- Looking to Customize YouTube Video Embeds
- Video post format, extra content breaks video embed
- Get video from the post on homepage
- Video Block does not autoplay
- Hide download option video shortcode
- Videos Post Type with Custom Filters
- Change loading order of blocks
- Allow users to post their videos to my wordpress website?
- Render Shortcode in Lightbox Gallery
- Categories Help and video uploads
- how to embed a .mp4 video the url postfix with secret key
- Add Play Icon on thumbnail overlay for video post types
- Why doesn’t WordPress make thumbnails for videos?
- Have video content populate page from upload sub-directory?
- Configuration Options for embedded YouTube Videos
- Make videos output as iframes not links
- Force resize for all video content
- iframe/embed vid in text widget loads outside container and moves around when scrolling the page?
- Can someone please help me find a solution to my youtube embed problems? [duplicate]
- Add Javascript/Html into a WordPress
- Hover images and Videos
- How can I directly upload smartphone videos to blog and comments?
- Vimeo video play button color function
- How to show video from post on the all posts page?