Logo link

Home Forums Gillion Theme Logo link

Home Forums Gillion Theme Logo link

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    RESOLVED Posts
  • Diacre
    Participant

    How do I change the default logo link?

    Hi Diacre,

     

    I hope you are well today and thank you for your question.

     

    If you want to change default logo then you can do so from theme header settings but if you want to change logo URL then you have to add following function code in the functions.php file of Gillion child Theme and change the function home_url( ‘/’ ) to URL whatever you want to.

     

    
    
    function gillion_header_logo() {
    
    $standard_logo = gillion_option_image('logo');
    
    /* Use Gillion Logo if Logo is not uploaded */
    if( !$standard_logo ) :
    $standard_logo = get_template_directory_uri().'/img/logo.png';
    endif;
    
    $sticky_logo = ( gillion_option_image('logo_sticky') ) ? gillion_option_image('logo_sticky') : $standard_logo;
    $light_logo = ( gillion_option_image('logo_light') ) ? gillion_option_image('logo_light') : $standard_logo;
    
    if( gillion_logo_height() && gillion_logo_height() != 'auto' ) :
    $height = ' height="'.str_replace("px", "", gillion_logo_height() ).'"';
    else :
    $height = '';
    endif;
    ?>
    <div class="header-logo">
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="header-logo-container sh-table-small">
    <div class="sh-table-cell">
    
    <img class="sh-standard-logo" src="<?php echo esc_url( $standard_logo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>"<?php echo esc_attr( $height ); ?> />
    <img class="sh-sticky-logo" src="<?php echo esc_url( $sticky_logo ); ?>" alt="<?php echo get_bloginfo( 'name' ); ?>"<?php echo esc_attr( $height ); ?> />
    <img class="sh-light-logo" src="<?php echo esc_url( $light_logo ); ?>" alt="<?php echo get_bloginfo( 'name' ); ?>"<?php echo esc_attr( $height ); ?> />
    
    </div>
    </a>
    </div>
    
    <?php }
    
    

     

    Best regards,
    Shufflehound team

    Diacre
    Participant

    It’s not working. I’m trying to link it to an external link.

    Diacre
    Participant

    Here’s what I tried

     

    function gillion_header_logo() {

    $standard_logo = gillion_option_image(‘logo’);

    /* Use Gillion Logo if Logo is not uploaded */
    if( !$standard_logo ) :
    $standard_logo = get_template_directory_uri().’/img/logo.png’;
    endif;

    $sticky_logo = ( gillion_option_image(‘logo_sticky’) ) ? gillion_option_image(‘logo_sticky’) : $standard_logo;
    $light_logo = ( gillion_option_image(‘logo_light’) ) ? gillion_option_image(‘logo_light’) : $standard_logo;

    if( gillion_logo_height() && gillion_logo_height() != ‘auto’ ) :
    $height = ‘ height=”‘.str_replace(“px”, “”, gillion_logo_height() ).'”‘;
    else :
    $height = ”;
    endif;
    ?>
    <div class=”header-logo”>
    ‘ )); ?>” class=”header-logo-container sh-table-small”>
    <div class=”sh-table-cell”>

    ” alt=”<?php echo esc_attr( get_bloginfo( ‘name’ ) ); ?>”<?php echo esc_attr( $height ); ?> />
    ” alt=”<?php echo get_bloginfo( ‘name’ ); ?>”<?php echo esc_attr( $height ); ?> />
    ” alt=”<?php echo get_bloginfo( ‘name’ ); ?>”<?php echo esc_attr( $height ); ?> />

    </div>

    </div>

    <?php }

    Diacre
    Participant

    Nevermind. It worked!!

    Awesome great to see it is working for you now.

     

    Please advise if you have more questions.

     

    Have a fantastic day!

Viewing 6 posts - 1 through 6 (of 6 total)