Plugin Author
Ajay
(@ajay)
You can’t do that easily currently without editting the plugin files.
That’s fine. Would you be able to direct me to the right place to look for what needs to be changed/added?
Plugin Author
Ajay
(@ajay)
Before line 723, you will need to add:
https://github.com/ajaydsouza/top-10/blob/master/top-10.php#L723
$tptn_thumb_class = "tptn_thumb " . implode( " ", wp_list_pluck( $categorys, 'slug' ) );
And then some lines below: https://github.com/ajaydsouza/top-10/blob/master/top-10.php#L732
'class' => $tptn_thumb_class,
Awesome, thank you!
This plugin has better support that some paid ones I’ve used 🙂
Plugin Author
Ajay
(@ajay)
Thank you. It is good to hear that. Do consider leaving a good review as well.
So that section would look like this when complete?
if ( 'inline' == $post_thumb_op || 'after' == $post_thumb_op || 'thumbs_only' == $post_thumb_op ) {
$output .= '<a href="' . get_permalink( $postid ) . '" rel="' . $rel_attribute . '" ' . $target_attribute . ' class="tptn_link">'; // Add beginning of link
$tptn_thumb_class = "tptn_thumb " . implode( " ", wp_list_pluck( $categorys, 'slug' ) );
$output .= tptn_get_the_post_thumbnail( array(
'postid' => $postid,
'thumb_height' => $thumb_height,
'thumb_width' => $thumb_width,
'thumb_meta' => $thumb_meta,
'thumb_html' => $thumb_html,
'thumb_default' => $thumb_default,
'thumb_default_show' => $thumb_default_show,
'scan_images' => $scan_images,
'class' => "tptn_thumb",
'class' => $tptn_thumb_class,
) );
$output .= '</a>'; // Close the link
}
Thanks, can this be adjusted to overlay the post title and category over the thumbnail as well?
You already have that under:
$tptn_thumb_class = "tptn_thumb " . implode( " ", wp_list_pluck( $categorys, 'slug' ) );
You can also try:
$tptn_thumb_class = "tptn_thumb " . $post_title . implode( " ", wp_list_pluck( $categorys, 'slug' ) );
Please note that this is valid for the current version of the plugin. The new one will eventually make this easier.