Hello there,
Did you test specific page or the entire sites? Do you have a link to your site to share here, so I can check it as well.
Regards,
Kharis
I’ve tested whole site.
https://www.maxfox.cz/
Thank you.
Hello there,
By default H1 appears on the site’s title and it will be hidden when a site’s logo enabled. To use H1 tag and a logo image, visit Appearance > Customize > Site branding; remove your current logo. And add the below CSS code to Appearance > Customize > Additional CSS from dashboard.
.site-branding > .site-title a {
display: inline-block;
width: 149px;
height: 82px;
background-image: url('https://www.maxfox.cz/wp-content/uploads/2019/04/MaxFox-logo-TRANSPARENT4.png');
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
text-indent: -999999px;
}
.site-branding > .site-description {
display: none;
}
Regards,
Kharis
Hello,
I’ve made what you suggest, but when I inspect published page it looks still no h1. Would you please check it?
Thank you.
https://www.dropbox.com/s/tl97umqxwv61y0x/2019-05-23_142214.jpg?dl=0
-
This reply was modified 7 years ago by
richietau.
-
This reply was modified 7 years ago by
richietau.
Hello there,
Try adding the below snippet to a child theme’s functions.php
function astrid_branding() {
$site_logo = get_theme_mod('site_logo');
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
the_custom_logo();
} elseif ( $site_logo ) {
echo '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr(get_bloginfo('name')) . '"><img class="site-logo" src="' . esc_url($site_logo) . '" alt="' . esc_attr(get_bloginfo('name')) . '" /></a>';
} else {
if ( is_front_page() && is_home() ) {
echo '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></h1>';
} else {
echo '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></h1>';
}
echo '<p class="site-description">' . esc_html(get_bloginfo( 'description' )) . '</p>';
}
}
If you’re new to a child theme, consult to this codex:
https://developer.ww.wp.xz.cn/themes/advanced-topics/child-themes/
Regards,
Kharis
Hi Kharis, before i try to make child theme, should i leave in additional css script above “.site-bran…” or just the function in functions.php
Is it all due to H1 functionality?
Hello there,
That’s a function that prints site name in the header area. You must add it to child theme’s functions.php file.
Regards,
Kharis