Reply To: Blog Pictures on Homepage

Home Forums WordPress Themes – Premium Lavish Pro Blog Pictures on Homepage Reply To: Blog Pictures on Homepage

#17016
Sushil Adhikari
Moderator

Hi Greg Rockwell,

Please add this code on child theme functions.php file to make thumbnail image clickable: Note: If you are technically sound on WordPress then only please proceed this steps:

//first remove the function  attached to a lr_thumbnail action hook.
add_action('wp_head', 'lavish_child_remove_action');
Function lavish_child_remove_action () {
	remove_action('lr_thumbnail', 'lr_thumbnail_fnc');
}

//Again add the function  attached to a lr_thumbnail action hook.
add_action('lr_thumbnail', 'lavish_child_add_permalink');
Function lavish_child_add_permalink() {
	$get_theme_mod_blog1 = get_theme_mod('blog_style');

    if (!($get_theme_mod_blog1 == 'manosaryleft') && !($get_theme_mod_blog1 == 'manosaryright') && !($get_theme_mod_blog1 == 'manosarywide')) {
        if (!($get_theme_mod_blog1 == 'boxedwide') && !($get_theme_mod_blog1 == 'boxedleft') && !($get_theme_mod_blog1 == 'boxedright')) {
            if ( has_post_thumbnail()) {
                $featuredimage = get_theme_mod( 'featured_image', 'big' );
                    switch ($featuredimage) {
                        case "big" :
                        echo '
'; the_post_thumbnail('big'); echo '
'; break; case "small" : echo '
'; the_post_thumbnail('medium'); echo '
'; break; } } } else { if ( has_post_thumbnail()) { $featuredimage = get_theme_mod( 'featured_image', 'big' ); switch ($featuredimage) { case "big" : echo '
'; the_post_thumbnail('big'); echo '
'; break; case "small" : echo '
'; the_post_thumbnail('medium'); echo '
'; break; } } } } else { if ( has_post_thumbnail()) { echo '
'; ?> <a href="https://www.styledthemes.com/"> <?php echo '
'; } } }

Note: Using child theme will prevents your changes to lost on theme update.