0

Good Afternoon,

I am having difficulty removing a duplicate H1 tag, which is located in my Site-Title-Wrapper, per source code.

enter image description here

When I access "Edit Theme" and load the "site-title.php" I can see the wrapper code that appears in the source code, but it contains three variables, none of which contain H1 or are able to be found in the Editor Section.

enter image description here

Where can I go to remove the H1/ update it to an H2/H3?

Thanks!

  • CD
1
  • To answer this question, one would need to have very intimate knowledge about the code of your particular theme. As such, it may be considered off-topic on our site, and would be best addressed in the official support channels for your specific theme.
    – bosco
    Commented Sep 17, 2018 at 16:02

1 Answer 1

1

Looking into the source code of the "Primer" theme, it looks like there's a filter available primer_the_site_title_args in /inc/hooks.php, which is wrapped in a conditional for is_home(). Something like the following added to your functions.php in a child theme should allow the title on the home page to be an h2 instead if you choose:

add_filter( 'primer_the_site_title_args', function( $args ) {
    if ( is_home() ) {
       $args['wrapper'] = 'h2';
    }
    return $args;
} );

Not the answer you're looking for? Browse other questions tagged or ask your own question.