How to set that featured image in WordPress can also be video or audio file.
Best solution if that can be done trough functions.php. Please if it is possible with no plugins.
Related
I have an option when creating my post to add a featured image, however I would like to be able to add here a featured video too.
How I can add a featured image
The videos that I want to add are YouTube Vidoes.
I have tried following this blog, but it is not working in my case since my theme doesn't give me the format option.
Thank you for your help.
I am using Woocomerce. I want to set Product image and Product gallery image from external URL (i.e. google photos) other than media library.
Product Image
Product Gallery Image
Is there code or plugin to do that?
you may use this plugin to solve.
featured image from url plugin
by the way not recommend to use cause it may slow down the site speed. :(
i want any code works like this you have static thumbnail as featured image, on hover it will automatically play HTML5 video which is pre-defined for each post (like youtube site)
Try this
if you want to go with WordPress plugin
1 - Easy Video Player - Free
2 - Media Hovers Wordpress Plugin - Paid
OR
If you want to go with coding -
You can add a poster by adding poster="Thumbnail-image.jpg" to the tag
.
<video poster="Thumbnail-image.jpg"
src="yourvideo.mp4"
id="id0" width="300" onMouseOver="id0.play()"
onMouseOut="id0.pause()"
onclick="window.location='yourvideo.mp4';id0.pause()"
loop title="yourvideo.mp4" >
</video>
here Thumbnail-image.jpg is your thumbnail image and yourvideo.mp4 is
video to play on hover.
If the uploader of WordPress does not support .webm, .ogg or .mp4 files
(I haven’t checked that), you can always use an ftp (like Filezilla) program to upload the video’s.
I am using the Kaltura's All i One Video Plugin in WordPress. Whenver, I post a video using Kaltura, whether it is embeded or through the Plug-in Content, The Post doesn't fetch it's thumbnail. If i use youtube or any other video link the thumbnail load corrctly.
Is the thumb generate properly on Kaltura? Can you see it in the kmc?
In my wordpress blog, I would like to select a featured image so that when url is shared on social network like facebook it has an image. but I do not want that image to show up on the page or the post of website.
You should modify the template responsible for post visualisation and add the OpenGraph meta tag.
Here's the documentation:
https://developers.facebook.com/docs/sharing/webmasters#markup
The tag you need is "og:image":
<meta property="og:image" content="<your image path>" />
It is not a big problem. There are lot of plugins from wordpress by which you can set featured image for any posts.
Here is the link to the plugin
Featured image plugin
you have to modify the single.php file and page.php file.
You can remove the code segment that show featured image from the above two files.
also there are some plugin may do this functionality,
you can check this, But I haven't check this one.
https://wordpress.org/plugins/hide-featured-image/