Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Created February 29, 2024 10:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/f5e76fac7b2c3dfa4c85977c5c517bb0 to your computer and use it in GitHub Desktop.
Save KaineLabs/f5e76fac7b2c3dfa4c85977c5c517bb0 to your computer and use it in GitHub Desktop.
Youzify - Make Image Thumbnail on Post Tab Clickable
<?php
// Youzify - Make Image Thumbnail on Post Tab Clickable
function yzc_blog_post_thumbnail(){
?>
<script>
jQuery(document).ready(function(){
jQuery(document).delegate(".youzify-posts .youzify-tab-post div:first-child","click",function(){
var link = jQuery(this).next().find('.youzify-post-title a').attr("href");
if(link){
window.location.href = link;
}
});
});
</script>
<?php
}
add_action('wp_head', 'yzc_blog_post_thumbnail');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment