Single Video Embed on front page (5 posts)

Topic tags: Embed, twentyeleven, video
  • Profile picture of Tim Beckett Tim Beckett said 1 year, 9 months ago:

    Hi Folks,

    I’m setting up a magazine theme as part of our magazine website. We have three main categories to display – essays and stories, poetry, images and video. The big problem I’m having – how to pull a single video from a post that maybe video and some text, or multiple videos. This theme is a child theme of twentyeleven, and uses the native wordpress uploader. I can display video with text, or the whole post, I can pull a single image from a post – but not video. Any idea how I might do this?

    The (staging) site is: http://www.blogstaging.sensitiveskinmagazine.com

    Thanks!

    Tim

  • Profile picture of Steve Steve said 1 year, 9 months ago:

    Hi Tim,

    Please clarify— you are uploading videos and want to show a thumbnail of the video?

  • Profile picture of Joly MacFie Joly MacFie said 1 year, 9 months ago:

    I’m guessing it is a turnkey magazine theme that has a “featured post” feature and he’s looking for a way to select a particular piece of content to be actually featured. Fullsize not a thumbnail. Could it not be done via a custom ‘feature’ field that is hidden in the original post?

  • Profile picture of Tim Beckett Tim Beckett said 1 year, 9 months ago:

    Hi Steve and Joly,

    Thanks for getting back. This is a child theme built on twentyeleven. The most customized part is the front page. Basically, it allows dozens of writers to post entries, have them appear in different categories on the front page – art, video, essays etc. Everything seems to work fine but video.

    I would like to see video displayed full-size in the top left section – and be able to pull out a video from a post the way one pulls out featured images.

    One of the problems here is that most of these users will have no computer knowledge, ie no knowledge of markup, custom fields or anything like that. So we have to keep it as simple as possible.

    Joly – are you talking about adding a custom field then pulling that up on the front page?

    I was wondering if there was a plugin that would allow you to pull out a featured video, the way you pull out featured images.

    Thanks,

    Tim

  • Profile picture of Tim Beckett Tim Beckett said 1 year, 9 months ago:

    To illustrate – this is the code we are using to pull out images from the post and display in the appropriate section on the front page (note, I’m using a plugin called ‘excerpt re-reloaded’ to control the excerpt length depending on whether there is an image or not.

    Is there a way to pull up a single the same way? :

    $args = array(
    ‘numberposts’ => 1,
    ‘post_type’ => ‘attachment’,
    ‘status’ => ‘publish’,
    ‘post_mime_type’ => ‘image’,
    ‘post_parent’ => $post->ID
    );
    $images = &get_children($args);
    //start if/else
    if($images) {

    foreach ( (array) $images as $attachment_id => $attachment ) { ?>
    <a href="” rel=”bookmark” title=”">

    <?php the_excerpt_rereloaded('55','','‘,’div’,'yes’); ?>

    <?php the_excerpt_rereloaded('90','…','‘,’div’,'yes’); ?>
    }
    ?>