Force resize for all video content

Without knowing more information – you can use CSS to set a max width to any element. iframe, object, embed { max-width:100%; } Rachel Baker mentioned Fitvids.JS in her WordCamp Chicago presentation last weekend. It is a Javascript plugin that writes specific code for the various video providers online. Try the CSS solution and fall … Read more

Make videos output as iframes not links

Copy paste from my answer here but with iframe/video mime type added: Alter image output in content function WPSE_80145_Mime($html, $id) { //fetching attachment by post $id $attachment = get_post($id); $mime_type = $attachment->post_mime_type; //get an valid array of video types, add any extra ones you need $image_exts = array( ‘video/mpeg’, ‘video/mp4’, ‘video/quicktime’ ); //checking the above … Read more

Built-in Method to Extract Embedded Video from Content

It looks like the closest you get is in the WP-Embed class: autoembed( $content ); It says it extracts urls which are on distinct lines (like you’d put a url in for embedding it), but it then passes it to WP_Embed::shortcode(). Not quite what you want. You could dig into WP_Embed::shortcode() to see if you … Read more

How can i make like this structure?

Do you mean when you click on each (or any) News item, you have the scroll list of video/image + the slider OR your accordion replaces the scroll list in your capture ? Anyhow, i think this is more a javascript question than a WordPress one. You could use jquery UI Accordion , or an … Read more

How to fetch all videos in custom page which uploaded in wp-admin (Media) in wordpress

Uploaded images, video’s etc. are stored as posts with the type “attachment”; use get_posts( ) with the right parameters. Try this; the code loops trough all attachments and displays them: $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => null, ‘post_parent’ => null, // any parent ‘post_mime_type’ => ‘YOUR-POST-MIME-TYPE’ ); $attachments = get_posts( … Read more

Find Videos Inside a Post

This is the statement I am currently using to extract YouTube URLs from a post: preg_match(‘|http://www.youtube.com/watch\?v=([a-zA-Z0-9\-\_]+)|’, $post->post_content, $matches); $matches[1] contains the ID of the first video. This may not cover all the YouTube URL formats, but it should give you a start.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)