Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #63330

    John R
    Participant

    Hi i would like to put a link directly under logo Cichlid Central.Com top left

    I would like to add words: Link and be able to have that link red on mouseover the same as menu

    can you advise

    Thank you

    #63334

    John R
    Participant
    This reply has been marked as private.
    #63640

    Zeshan
    Member

    Hi John,

    Thank you for writing in!

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    After that please go to x/framework/views/global/ and duplicate the file _brand.php in your child theme’s folder framework/views/global/. Then open it in a text editor, and replaced the entire code with:

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_BRAND.PHP
    // -----------------------------------------------------------------------------
    // Outputs the brand.
    // =============================================================================
    
    $site_name        = get_bloginfo( 'name' );
    $site_description = get_bloginfo( 'description' );
    $logo             = x_make_protocol_relative( get_theme_mod( 'x_logo' ) );
    $site_logo        = '<img src="' . $logo . '" alt="' . $site_description . '">';
    
    ?>
    
    <?php echo ( is_front_page() ) ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?>
    
    <?php echo ( is_front_page() ) ? '<div class="custom-brand">' : ''; ?>
    
    	<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
    	  <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
    	</a>
    	
    <?php echo ( is_front_page() ) ? '<a href="#" class="custom-brand-link">TEXT HERE</a></div>' : ''; ?>
    

    After that replace # with your actual link and TEXT HERE with the text you want to appear below the logo, from the last line of the above code.

    After that, please add the following CSS code to Customizer > Custom > CSS:

    .custom-brand {
       float: left;
    }
    
    .custom-brand .x-brand {
       margin-bottom: 5px;
       float: none;
    }
    
    .custom-brand .custom-brand-link {/* ADD style for Custom Link */}
    

    Hope this helps. Please let us know if you have any further question, we will be happy to answer.

    Thank you

    #63719

    John R
    Participant

    That sounds pretty complicated. child theme is installed some weeks agao

    #64094

    Mrinal
    Member

    Hi John,

    Customizations are meant to be little complicated but luckily we’ve described step to step process in our KB. Did you checked the mentioned link in our previous reply?