Author |
Message |
mrixnewaccount
Regular
Joined: May 06, 2013
Posts: 50
|
Posted:
Sat Apr 25, 2015 12:29 pm |
|
Hello all, could someone please let me know which file I would need to edit to add a H1 tag to the body of the front page ?
Thanks all
mrix |
|
|
|
|
nuken
RavenNuke(tm) Development Team
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Sat Apr 25, 2015 12:41 pm |
|
What do you want it added to on the front page? You should have no issue with using the H1 tag with the editor. Your themes css may need the size or color defined or changed for the tag. [ Only registered users can see links on this board! Get registered or login! ]
If you are using an older theme that did not come with RN, you may also have some other styling overriding the css in the theme files. |
_________________ Tricked Out News |
|
|
|
mrixnewaccount
|
Posted:
Sat Apr 25, 2015 1:09 pm |
|
Hello, I have basically run a few SEO checks recently and many keep mentioning the sites missing an H1 tag, here is something I come up with that does not show up on the page so seems ideal..
<h1 style="display: none;">Title of your website</h1>
This is why I was wondering where I could slip this in to the body part of the front page etc.
I am using a very old theme unfortunately.
Thanks
mrix |
|
|
|
|
nuken
|
Posted:
Sat Apr 25, 2015 5:42 pm |
|
I assume you are referring to a validation error saying you are missing either an opening <h1> or a closing </ h1>. If that is the case, some where on your site a tag is missing. This is not a big deal. If you want to correct it, you will have to determine where is is missing from. It could be your theme or some content on your site. The validator at [ Only registered users can see links on this board! Get registered or login! ] might help you locate it. If you are using an old theme, there will probably be a lot of validation errors. |
|
|
|
|
nuken
|
Posted:
Sat Apr 25, 2015 6:03 pm |
|
I think I see what you are talking about. Some sites claim the h1 tag helps when your content is indexed by google. What they say is to have your content titles wrapped in h1 tags. Like a news title or a page title. If that is what you are wanting, you can place it anywhere in your theme you feel appropriate. If your theme uses .html files, use one of them. If your theme only has a theme.php, use that. |
|
|
|
|
mrixnewaccount
|
Posted:
Sat Apr 25, 2015 6:11 pm |
|
Quote: | I think I see what you are talking about. Some sites claim the h1 tag helps when your content is indexed by google. What they say is to have your content titles wrapped in h1 tags. Like a news title or a page title. If that is what you are wanting, you can place it anywhere in your theme you feel appropriate. If your theme uses .html files, use one of them. If your theme only has a theme.php, use that. |
Yes that is correct and thanks for the information, it appears many seo analysers pick up on a title H1 tag at the moment and I even saw a video with some main guy from Google stating its importance also.
I guess now is how can I covert this code <h1 style="display: none;">Title of your website</h1> to something that would work in a theme.php file ?
Thanks
mrix |
|
|
|
|
neralex
Site Admin
Joined: Aug 22, 2007
Posts: 1774
|
Posted:
Sun Apr 26, 2015 3:57 am |
|
Type it in a function before or after a container so it doesn't create a validation error.
php Code:echo '<h1 style="display: none;">Title of your website</h1>';
|
But i don't think that is a good solution because if you defined a clear document title then it does the job. A hidden h1 tag alone doesn't help. As nuken wrote, normally the h1 tag is used on single pages like a article for the headline (article title) to help the search-bots to indicate the headline. You will find also the h1 tag on query loops that contains maybe a list of articles, pages etc. It exists in the web many great articles how you can optimize the code of your theme to make it SEO friendly and i would start at first with cleaning and optimizing the HTML markup. Because on this way you will find the way to implement the h1 tags. Now is the big question which theme you are using and if would makes really sense to optimize your theme or to change it completely. |
_________________ Github: RavenNuke |
|
|
|
wHiTeHaT
Life Cycles Becoming CPU Cycles
Joined: Jul 18, 2004
Posts: 579
|
Posted:
Sun Apr 26, 2015 12:45 pm |
|
simply change :
Code:<h1 style="display: none;">Title of your website</h1>
|
To:
Code:<h1 hidden>Title of your website</h1>
|
Sorry neralex , i thought your answer was the bug.
Not sure if Google see a difference in hidden (html5) or via css disply none |
|
|
|
|
mrixnewaccount
|
Posted:
Sun Apr 26, 2015 2:24 pm |
|
So with both your inputs I have changed the code to this and entered it in my theme.php file and all appears fine with the SEO side of things.
This was the code I added Quote: | echo '<h1 hidden>Title of your website</h1>'; |
Thanks
mrix |
|
|
|
|
neralex
|
Posted:
Sun Apr 26, 2015 4:31 pm |
|
wHiTeHaT, no worries! If it will help then is it fine but with xhtml it creates on your way a validation error. Better to close out a bug instead to create a new one. |
|
|
|
|
|