How to make featured images clickable in Generate Pro

Generate Pro has code to add featured image above the content (when featured image is set to be shown in content archives in Genesis settings) but it’s not set to link to post’s permalinks.

If you’d like the featured images for entries in content archives to be clickable, simply edit the child theme’s functions.php and change

printf( '<div class="featured-image"><img src="%s" alt="%s" class="entry-image"/></div>', $image, the_title_attribute( 'echo=0' ) );

to

printf( '<div class="featured-image"><a href="%s"><img src="%s" alt="%s" class="entry-image"/></a></div>', get_the_permalink(), $image, the_title_attribute( 'echo=0' ) );
This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.