Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Customizing Karma Theme: Gallery Thumbnails WordPress

Please see this exchange with the theme developer. They recommended wpquestions as a solution for me.

Here is my question:

Just putting together a new site for a course I'm teaching.

I notice that if I create a video post with YouTube, the video’s existing thumbnail appears as the featured image for the post, and also if I include the post in the homepage slider. Additionally, if I add a separate featured image to the post, that image replaces the video’s built-in thumbnail on the post display, but not on the slider (it still displays the built-in thumbnail). Finally, on a gallery page, the video seems to need a separate featured image in order for it to be clickable at all – otherwise no thumbnail appears.
I’m trying to make everything as easy and consistent as possible, and would like for the built-in thumbnail to be able to display (and be clickable) throughout the site, wherever the video post is found, whether on a slider, on its own separate post, or in a gallery. I would rather not have to grab a thumbnail from the video, add it to the media directory on my server and then paste it into the box on the post page – particularly with the video thumbnail displaying just fine (prioritized even…) elsewhere in the theme.

Site URL:

Possible? Thanks!
Developer's reply:
Video in the Slider or Blog is simply embeded directly onto the placeholder. It doesn’t show an Image Thumbnail, it simply shows a snapshot as set by YouTube. Only when using the Theme’s Image Frames or Gallery do you need to set an image Thumbnail which is used to trigger the Lightbox popup.
Having an image thumbnail be set for all your embeded videos requires that a custom solution be coded for you.

Anyone on this site able to code the theme so that the built-in 'shapshot' from YouTube (or Vimeo etc.) shows up as the clickable image in the Gallery page templates for this theme?


Answers (2)


Arnav Joy answers:

Hi ,

i would like to help you for this , can you explian it more and provide any screenshot or mockup with comments in it what it is there and what you want?

John Tarnoff comments:

thanks. Please see the website:

Note that the video posts show the built-in thumbnail on the homepage slider, on the post itself, but not in the gallery called "Videos." See also the developer's explanation.

I want the thumbnails on the Videos page to be the built-in thumbnails, not the "featured image" thumbnail that must be loaded additionally.


Abdelhadi Touil answers:

I understand your problem, but I want to have a look in your theme files. Please list us here you theme's files. I'd like also see the functions.php and archive.php code please.
For me I always make the built-in thumb for videos from youtube clickable, here you are an example of one of my websites (It's in arabic):
[[LINK href=""]][[/LINK]]
Good luck.

John Tarnoff comments:

Your solution appears to work, but I want to preserve the formatting of the page in my Theme and not use a new format that is not consistent. So I would not want to use your template.

Here is the functions.php


//check WP_DEBUG, if set to true, we suppress warning, notice, deprecated, and user notice
//If wpcu3er is activated, this wpcu3er plugin suppress all errors even if WP_DEBUG is set to true,
//need to set display_errors to 1 in wpcu3er plugin to allow errors for troubleshooting
if(defined('WP_DEBUG') == 1 || WP_DEBUG == true){
ini_set('display_errors', '1');

// Required TrueThemes Framework - do not edit
require_once(TEMPLATEPATH . '/truethemes_framework/truethemes_framework_init.php');

// Load translation text domain
load_theme_textdomain ('truethemes_localize');

// **** Add your custom codes below this line ****


Here is the archive.php

<?php get_header(); ?>
</div><!-- header-area -->
</div><!-- end rays -->
</div><!-- end header-holder -->
</div><!-- end header -->

<?php truethemes_before_main_hook();// action hook, see truethemes_framework/global/hooks.php ?>

<div id="main">
$ka_blogtitle = get_option('ka_blogtitle');
$ka_searchbar = get_option('ka_searchbar');
$ka_crumbs = get_option('ka_crumbs');
$ka_blogbutton = get_option('ka_blogbutton');
$ka_posted_by = get_option('ka_posted_by');
$ka_post_date = get_option('ka_post_date');
if ($ka_post_date != "false"){ $ka_post_date_result = 'style="background:none !important;"';}else{$ka_post_date_result = '';}
$ka_dragshare = get_option('ka_dragshare');
$blog_image_frame = get_option('ka_blog_image_frame');
global $ttso;
$show_tools_panel = $ttso->ka_tools_panel;
<div class="main-area">

* Check to display or hide tools panel
* @since version 2.6 development
if($show_tools_panel != 'false'):

<div class="tools">
<div class="holder">
<div class="frame">

<?php truethemes_before_article_title_hook();// action hook, see truethemes_framework/global/hooks.php ?>

<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h1>Archive for '<?php single_cat_title(); ?>'</h1>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h1>Posts Tagged '<?php single_tag_title(); ?>'</h1>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h1>Archive for <?php the_time('F jS, Y'); ?></h1>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h1>Archive for <?php the_time('F, Y'); ?></h1>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h1>Archive for <?php the_time('Y'); ?></h1>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h1>Author Archive</h1>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h1>Blog Archives</h1>
<?php } ?>
<?php if ($ka_searchbar == "true"){get_template_part('searchform','childtheme');} else {} ?>
<?php if ($ka_crumbs == "true"){ $bc = new simple_breadcrumb;} else {} ?>

<?php truethemes_after_searchform_hook();// action hook, see truethemes_framework/global/hooks.php ?>

</div><!-- end frame -->
</div><!-- end holder -->
</div><!-- end tools -->

<?php endif; //end show tools panel check @since version 2.6 dev ?>

<div class="main-holder">
<div id="content" class="content_blog">
//create a file in child theme called content-blog-childtheme.php to overwrite this.
</div><!-- end content -->

<div id="sidebar" class="sidebar_blog">
<?php dynamic_sidebar("Blog Sidebar"); ?>
</div><!-- end sidebar -->
</div><!-- end main-holder -->
</div><!-- main-area -->

<?php get_footer(); ?>

Abdelhadi Touil comments:

Hi. just come back from the work.
I didn't ask you to use my template, it was just an example. For your theme I think it's necessary to send me it if you want to be able to resolve the problem.
Good luck.

John Tarnoff comments:

Here is the theme package.
Please let me know exactly what you would do. Would it be safer for you to make changes to the child theme instead of the main theme? Also, please refer me to other people you have done work for on this site to validate your skills.


Abdelhadi Touil comments:

You can visit my profile at donanza for more information about me:
[[LINK href=""]][[/LINK]]
If you send me the theme package I'll test changes in localhost (in my PC), then tell you what to do.
Good luck.

John Tarnoff comments:

I attached the file to my last reply. Please confirm that you received it, thanks.

Abdelhadi Touil comments:

I didn't see any attachment. I prefer to send it to my email at: hadi060[at]