How to show featured image on video pages

Posted in: Newspaper
Post count: 61

Hi,

How can I show the featured image on video pages

Thank you for your help

Post count: 61

Hi,

Its easy, edited /wp-content/themes/Newspaper/includes/app/modules/module_modifier/td_module_blog.php

function get_image($thumbType, $image_link = ”, $image_excerpt = ”) {
global $page;
if (!empty($page) and $page > 1) {
return;
}
//echo ‘raxxx’ . $page;

if (td_util::get_option(‘tds_show_featured_image’) == ‘hide’) {
return;
}

if (get_post_format($this->post->ID) == ‘gallery’) {
return;
// }

// 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();
// if (!empty($td_post_video[‘td_video’])) {
// return $td_video_support->renderVideo($td_post_video[‘td_video’]);
// }
} else {
//if it’s a normal post, show the default thumb

//get the full url
$attachment_id = get_post_thumbnail_id($this->post->ID);

$td_temp_image_url = wp_get_attachment_image_src($attachment_id, ‘full’);

$image_excerpt = get_post_field(‘post_excerpt’, $attachment_id);
if (!empty($image_excerpt)) {
$image_excerpt = ‘<p class=”wp-caption-text td-featured-image-caption”>’ . $image_excerpt . ‘</p>’;
}

$post_image = ”;

if (!empty($td_temp_image_url[0])) { //if we have a full url, link the image to that
$post_image = parent::get_image($thumbType, $td_temp_image_url[0], $image_excerpt);
} else {
$post_image = parent::get_image($thumbType, ”, $image_excerpt);
}

return $post_image;

}
}

Now the problem is how to have it not being overridden when updating.

Post count: 780

I can’t promise anything but we may add an option to show the thumbs on video posts

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