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?


  • CD

closed as off-topic by Michael, Jacob Peattie, bosco, Jack Johansson Sep 18 '18 at 6:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 Sep 17 '18 at 16:02

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.