-
plpapeman
Hi Guys,
I’m using GeneratePress Premium with the GP Child theme.
In Appearance > Customize > Site Identity I have enabled a logo along with the Site Title. By default, when the Site Title is enabled, it becomes a link to the Home page.
Is there any way to remove the link and just have a plain <p> Site Title?
Thanks.
WordPress 6.9.1
GeneratePress Premium 2.5.5
GenerateBlocks Pro 2.5.0 -
Alvind
Hi there,
Yes, you can use this snippet:
add_filter( 'generate_site_title_output', function( $output ) { $tag = ( is_front_page() && is_home() ) ? 'h1' : 'p'; $schema_attr = 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''; return sprintf( '<%1$s class="main-title"%3$s>%2$s</%1$s>', $tag, get_bloginfo( 'name' ), $schema_attr ); });Adding PHP: https://docs.generatepress.com/article/adding-php/
-
plpapeman
Perfect. Thank you Alvind.
-
Alvind
You’re welcome!
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.