-
AuthorPosts
-
September 2, 2015 at 10:36 am #376760
My main page the theme automatically defining my H1 and is placing it has visually hidden. How do I remove this and define my first custom headline has an H1. https://www.barkinglife.com
See code generated from page source
<h1 class=”visually-hidden”>Barking Life Pet Concierge</h1>
September 2, 2015 at 12:33 pm #376887Hi there,
Thanks for writing in! I am not sure where you are getting this. It should only to be added on the Logo Text if you use image as logo. That is if you use image logo, the class will hide the text as you don’t need it behind the logo.
I can’t see it’s being added anywhere and you can add your custom headline without any issue.
Thanks
September 2, 2015 at 1:28 pm #376927How do I remove <h1 class=”visually-hidden”>Barking Life Pet Concierge</h1> Hiding H1 and other content is bad for SEO. Plus I prefer to define my own H1 content.
Do I remove this code out of the brand.php or what do I adjust or remove?
September 2, 2015 at 4:09 pm #377103Hi There,
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. Then on the child theme’s framework/views/global/ directory create a file named _brand.php and paste the following code:
<?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>
Hope it helps, Cheers!
September 3, 2015 at 10:23 am #377973You post still has <?php /*echo ( is_front_page() ) ? ‘<h1 class=”visually-hidden”>’ . $site_name . ‘</h1>’ : ”;*/ ?> Do I just remove that line or do I need to change it?
September 3, 2015 at 1:26 pm #378112Hi there,
You can remove/change this line if you want.
Thanks
April 10, 2016 at 1:12 pm #875402This reply has been marked as private.April 11, 2016 at 12:37 am #875929Hello Drake,
Thanks for updating this thread!
Yes, this would still work and the best way to remove the H1 tag in your site.If you need anything else we can help you with, please let us know.
June 16, 2016 at 7:17 am #1045060This reply has been marked as private.June 16, 2016 at 10:04 am #1045302Hi there,
Thanks for updating. Make sure the file reside on right directory (VIEWS/GLOBAL/_BRAND.PHP)
If you think you placed it correctly, then you can share your login credentials in a private reply. Note that it’s not a good idea to share login credentials on other user’s thread because if we reply in private, yo uwon’t be able to see that. So you can open a new thread, reference this thread and share your details in a separate private reply. But make sire to check your directory first as suggested.
Cheers!
-
AuthorPosts