currently i know how to make a jquery slider and pull images by get thumbnail . But is there any way to make a option (using custom post types/custom fields/meta boxes) to get a video by id and show that video in the slider?
I have seen many theme developers are using flex slider and they included option for users to add videos to the slider .
You could just paste the video(not embed) link from certain sites directly into the content editor, and wordpress takes care of displaying the video for you, and you don’t have to store/serve the large video files on your server. Here’s a good little write up on that:
http://codex.wordpress.org/Embeds
If you have some need to add separation between the video and the posts content, you could use a simple custom field, or build a meta box, then paste video “embed” links from sites like youtube, into the field/box. Then you can display a specific video for your slide.
There’s a number of video sites, like youtube, that provide an embed link for showing your videos elsewhere. The page I linked to above has a list of video sites, and I think most(if not all) of them provide embed links for you to embed videos into your site.
EDIT for Sadi:
To add custom field support to your custom post type, open your functions.php file, and look for the register_post_type() function for your slides post type. you should see one of the options looks something like
'supports'=>array('title', 'editor', 'custom-fields')
. Note: you will likely need to add the'custom-fields'
part yourself to add custom field support to your custom post type.Next go edit, or add a new, slide and if you don’t see a new custom fields box at the bottom of the edit screen, click on “screen options”(top right area) and check off the Custom Fields box, then you will see the custom field editor at the bottom of your custom post type edit screen.
In the custom field editor box, fill in a Name like
slideVideo
, and paste a video(youtube) embed link into the Value text field. The name will be used to retrieve the value in the next step.Open up your template file that is displaying slides and inside the slide loop code(presuming it’s a loop) add the following code to check for your custom field and display it:
After saving your template, and refreshing your browser, you should see the video that you pasted the embed link from. If you just see a link to your video, then you likely didn’t use an embed link for the video.