Can't seem to add a H1 on my homepage

byebyebaby

Affiliate Guard Dog Member
Joined
Feb 11, 2014
Messages
451
Reaction score
130
It seems my homepage doesn't have a H1 tag.

And I have googled and searched a lot to see how I can add this. But I can't seem to find it.

I have seen appearances>costomize....but this brings me to my theme editor?

Can someone please help me?
 

AussieDave

24 years & still going!
Joined
Nov 28, 2013
Messages
4,993
Reaction score
3,533
Which site... heaven4netent.com (doesn't have a H1, H2 or H3 but does have H3 css)... degokhemel.nl (has H1 and H2 but no H3). Adding tags, or in your case specifically H1 tag, it depends on the WP theme, used. It could be added in the functions.php file, or maybe in the header.php file.

It all depends on the theme your using.

Should also note, that maybe not a simple HTML code, it may have to be in php.

The other possibility of why you'd have a H1/H2 tags missing, is your running a logo, and the H1/H2 tags maybe dynamically removed if your running a logo.

You really need to provide more information than you do, when, you asking for Wordpress help. You seem to give next to no info, which, is impossible for people to help you.
 

Frank

Affiliate Guard Dog Member
Joined
Jan 7, 2015
Messages
935
Reaction score
465
some themes use the title as h1.. some are added on their own.. if you dont have just add <h1>your text here</h1>
 

AussieDave

24 years & still going!
Joined
Nov 28, 2013
Messages
4,993
Reaction score
3,533
some themes use the title as h1.. some are added on their own.. if you dont have just add <h1>your text here</h1>
That's not actually how it's done... full marks for giving someone the wrong info!
 

AleksUnder

New Member
Joined
Oct 19, 2021
Messages
75
Reaction score
10
It seems my homepage doesn't have a H1 tag.

And I have googled and searched a lot to see how I can add this. But I can't seem to find it.

I have seen appearances>costomize....but this brings me to my theme editor?

Can someone please help me?
It's hard to understand your problem. Usually, we write h1 in our post. So, I suppose this h1 doesn't appear on the main page. Look what I found. In your header.php file in the theme editor, your need to add

<?php
is_front_page() ? $title_tag = 'h1' : $title_tag = 'div';
?>
<<?php echo $title_tag; ?> id="site-title">
<a href="<?php echo get_option('home'); ?>/"><?php bloginfo( 'name' ); ?></a>
</<?php echo $title_tag; ?>>

Alert! I didn't check by myself, so don't forget about backup.
For search, I was using this query: how to add h1 tag to wordpress main page theme editor
 
Top