• Resolved Anucho

    (@anucho)


    Hello everyone
    can someone explain how to make the image head banner clickable (to home page)
    Thank You

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Richie KS

    (@rkcorp)

    try add this to functions.php (child theme) or wp-content/meso-custom-functions.php

    <?php
    function meso_remove_custom_header() {
    remove_action('bp_inside_header','mesocolumn_cih_overlay');
    }
    add_action('init','meso_remove_custom_header');
    
    function mesocolumn_custom_cih_overlay() {
    $header_overlay = get_theme_mod('custom_header_overlay');
    if( get_header_image() && $header_overlay == 'Yes' ) {
    echo '<div id="custom-img-header"><a href="'. get_home_url() . '"><img src="'. get_header_image() . '" alt="' . get_bloginfo('name') . '" /></a></div>';
    }
    }
    add_action('bp_inside_header','mesocolumn_custom_cih_overlay');
    ?>

    Hi,

    I’m trying to do the same thing. It’s not working when I add to the child theme. I had added it directly to the functions.php and it worked, but then I got locked out of the admin. Any thoughts? Thanks!

    it doesn’t work for me, is there any other way?

    Theme Author Richie KS

    (@rkcorp)

    try

    <?php
    remove_action('bp_inside_header','mesocolumn_cih_overlay',10);
    function mesocolumn_custom_cih_overlay() {
    $header_overlay = get_theme_mod('custom_header_overlay');
    if( get_header_image() && $header_overlay == 'Yes' ) {
    echo '<div id="custom-img-header"><a href="'. get_home_url() . '"><img src="'. get_header_image() . '" alt="' . get_bloginfo('name') . '" /></a></div>';
    }
    }
    add_action('bp_inside_header','mesocolumn_custom_cih_overlay',20);
    ?>

    thank you, i tried this code but still not working, could you please check my link ?
    https://www.tnnlk.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Header clickable’ is closed to new replies.