Featured Image and Youtube Video Configuration

Posted in: Newspaper
Post count: 4

Hello,

Here’s what I’m trying to accomplish…

I would like to be able to create a post where the Youtube video appears at the bottom of a post and the featured image does not appear on the post. I would still like an image with play icon to appear on the homepage indicating there is a video included in the post.

I do not want this same behavior for posts with a featured image and no video. In that instance, I’m content with the featured image appearing on the homepage and at the top of the post page.

How can I accomplish both use cases?

Thanks,
Mike

Post count: 3343

Hi,

I’m not sure that i understand all your questions. If you want to move the video to be at the bottom, you need to make some code changes. Also this is possible manually if you want only pasting the video link in your post content at the bottom.

If you want automatic here is an example for default post style:

1. copy this code here:

function get_video() {
if (get_post_format($this->post->ID) == 'video') {
//if it's a video post...
$td_post_video = get_post_meta( $this->post->ID, 'td_post_video', true );
$td_video_support = new td_video_support();

//render the video if the post has a video in the featured video section of the post
if ( ! empty( $td_post_video['td_video'] ) ) {
return $td_video_support->renderVideo( $td_post_video['td_video'] );
}
}
}

http://screencast.com/t/TYqXYLWy

2. from the same file, remove this code: http://screencast.com/t/uhXt4KPYKOq6
3. edit a post file, in this case for the default post style and add this code like here, after the content: http://screencast.com/t/f5aMVVeR6

get_video(); ?>

Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.