• I would like my header to link to the homepage (as it is kind of second nature for internet users to click on that to go home.) But I can’t figure out how to do that. I do have a little WordPress customization experience but I couldn’t find the .php page that defined the header. ?? Thank you.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Di Themes

    (@dithemes)

    Hi @mmorrow4393

    You can use get_header_image_tag filter to modify header image HTML. so you will need to use below PHP codes in functions.php file.

    
    add_filter( 'get_header_image_tag', 'di_blog_hfuewhf_get_header_image_tag', 10, 1 );
    function di_blog_hfuewhf_get_header_image_tag( $html ) {
    	$html = str_replace( '<img', '<a href="https://melissa-morrow.com"><img', $html );
    	$html = str_replace( '/>', '/></a>', $html );
    	return $html;
    }
    

    Also we will recommend to use child theme and then past above code in functions.php of child theme otherwise these codes will remove on theme update.

    Thanks

    Thread Starter mmorrow4393

    (@mmorrow4393)

    Thank you! Worked perfect. I am using a child theme and love this theme and your support is always spot-on. ??

    mm

    Theme Author Di Themes

    (@dithemes)

    Hi @mmorrow4393

    You may also use ‘Header Image Clickable’ plugin: https://www.ads-software.com/plugins/header-image-clickable/

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Link header image to home’ is closed to new replies.