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

    DonWattz
    Participant

    How do I add text right below the logo and if I needed to style it, what would I do? I looked at other threads but none do what i need to do.

    http://178.01d.myftpupload.com

    #282565

    Darshana
    Moderator

    Hi there,

    Thank you for writing in!

    It’s possible to add text below logo. So as 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 duplicate x/framework/views/global/_brand.php to your child theme’s respective folder x-child/framework/views/global/ and in the duplicated file, replace all of the code with the following:

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

    Replace the word TAGLINE with your own text.

    After that you might want to style it. So for that purpose you can simply use the following CSS code in Customizer > Custom > CSS to make your desired CSS changes:

    /* to target SITE TITLE styling */
    .x-brand span {
       display: block;
    }
    
    /* to target TAGLINE styling */
    .x-navbar .tagline {
       display: block;
    }
    

    Hope that helps.

    #841722

    STEVE H
    Participant

    Hi,

    I have added the brand.php file to the child theme and added that CSS to the customizer. Everything is working perfectly, except that I cannot change the color of the tagline.

    Website: http://66.147.244.67/~travely9/savethepostoffice-X/
    X Theme: 4.3.4 (Renew)
    Wordpress 4.4.2

    Thanks for your help.

    #841930

    Darshana
    Moderator

    Hi there,

    You can add this under Custom > CSS in the Customizer.

    
    .tagline {
        color: #fff;
    }
    

    Hope that helps.

    #842033

    STEVE H
    Participant

    Yep, that did the trick. Thanks very much.

    #842398

    Friech
    Moderator

    We’re delighted to assist you with this.

    Cheers!