Created
November 10, 2016 07:05
-
-
Save dlucero23/f5e9eb3194cc7447242be3ed928fcd16 to your computer and use it in GitHub Desktop.
(To be placed in the X child theme - /framework/views/global ) Remove all h1 tags that wrap the logo, to prevent the duplicate h1 tag error, which damages SEO. Also includes the alt tag in the link "Logo".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 . '">'; | |
?> | |
<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>" alt="Logo"> | |
<?php echo ( $logo == '' ) ? $site_name : $site_logo; ?> | |
</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment