Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
mrixnewaccount
Regular
Regular



Joined: May 06, 2013
Posts: 50

PostPosted: Sat Apr 25, 2015 12:29 pm Reply with quote

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
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Sat Apr 25, 2015 12:41 pm Reply with quote

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 
View user's profile Send private message Send e-mail Visit poster's website
mrixnewaccount







PostPosted: Sat Apr 25, 2015 1:09 pm Reply with quote

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







PostPosted: Sat Apr 25, 2015 5:42 pm Reply with quote

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







PostPosted: Sat Apr 25, 2015 6:03 pm Reply with 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.
 
mrixnewaccount







PostPosted: Sat Apr 25, 2015 6:11 pm Reply with quote

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

PostPosted: Sun Apr 26, 2015 3:57 am Reply with quote

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 
View user's profile Send private message
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 579

PostPosted: Sun Apr 26, 2015 12:45 pm Reply with quote

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
 
View user's profile Send private message Send e-mail
mrixnewaccount







PostPosted: Sun Apr 26, 2015 2:24 pm Reply with quote

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







PostPosted: Sun Apr 26, 2015 4:31 pm Reply with quote

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. Wink
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©