-
AuthorPosts
-
May 26, 2015 at 6:33 pm #282507
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.
May 26, 2015 at 9:18 pm #282565Hi 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.
March 17, 2016 at 8:44 am #841722Hi,
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.2Thanks for your help.
March 17, 2016 at 1:15 pm #841930Hi there,
You can add this under Custom > CSS in the Customizer.
.tagline { color: #fff; }
Hope that helps.
March 17, 2016 at 3:24 pm #842033Yep, that did the trick. Thanks very much.
March 17, 2016 at 8:11 pm #842398We’re delighted to assist you with this.
Cheers!
-
AuthorPosts