Jump to content


Photo
- - - - -

Add H1 Tag to Site Title


This topic has been archived. This means that you cannot reply to this topic.
29 replies to this topic

#21 catrina

catrina

    Advocate

  • Members
  • 12345 posts

Posted 20 October 2011 - 02:25 AM

The page title is contained inside the branding wrap area of your header. The file that contains this area should be opened and the

tags can be added around the site title (which is a link). The HTML looks like this:

 <div class="branding_wrap">
		<div class="title-container"><a title="Home" href="http://www.ganttcharttemplate.com" class="home site-title">Gantt Chart Template</a><h6 class="site-description subhead">How To Make a Gantt Chart in Excel</h6></div>

The code in the file should look similar to this.


#22 pmurphy

pmurphy

    Advanced Member

  • Members
  • 47 posts

Posted 20 October 2011 - 03:16 AM

Hi Catrina. I'm using Platform Pro and Platform base and the code in my header.php and template.branding.php both look nothing like that. Any ideas?

#23 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 20 October 2011 - 07:17 AM

Apologies for my misunderstanding. I missed the bit where you explained what part you're looking to change and I guess I'm so used to calling it the branding section, it went right past me. As I understand it, you seek to add h1 tags or change any existing tags to h1 around the site title in the branding area. Your purpose in this has something to do with SEO. Is this correct? I'm not sure what SEO service, plugin or software is saying this is necessary, but to my experience, nothing could be further from the truth. My site, now online 15 years soared in the search engines with no optimization just from using Platform Pro. While I understand your desire, I think there may be some misinformation being given to you about the SEO effect an H1 tag would have. Search engines look for dynamic content - change, preferably daily. That would be better achieved by having an RSS feed active in a sidebar than with any font size tag. However, if your heart is firmly set on this, I'm informed by reliable sources that this can be done with a hook in functions. php. Or, if you just want to change the title tag, you can deactivate the Site Branding section entirely in Template Setup under Site Header and replace it with a Universal Sidebar. You can then go to the Universal Sidebar, add a text widget with the title embedded in h1 tags and the subtitle in h6. You can structure it with styling (add a few divs or classes) to align left, set fonts, colors, etc. Editing core files, as you know is not recommended.

#24 pmurphy

pmurphy

    Advanced Member

  • Members
  • 47 posts

Posted 20 October 2011 - 06:04 PM

I would love to use a hook. I'm guessing it would go in functions.php of Platform Base. Any ideas on how to just put a text title with an H1 tag as site title using a hook? Thanks!

#25 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 20 October 2011 - 06:13 PM

You'd basically replace the branding image with the title in h1 tags. The specifics of this customization would really need one of our Pros. I'd suggest you reach out to them at http://www.pagelines.com/pros.

#26 Danny

Danny

    Is Awesome!

  • Moderators
  • 17977 posts

Posted 21 October 2011 - 07:31 AM

You could try this:

In your favourite FTP client, goto "/wp-content/themes/platformpro/" and open the file called "template.branding.php". Once open, at the top you should this code:

 
	<div class="branding_wrap">
		<?php pagelines_main_logo(); ?>

Replace:

 
		<?php pagelines_main_logo(); ?>

With something like this:

 
			<div class="title-container">
	<h1><a title="Home" href="http://www.ganttcharttemplate.com" class="home-site-title">Gantt Chart Template</a></h1>How To Make a Gantt Chart in Excel</div>

Save the file, clear your browsers cache and now you should a your h1 site title. You may want to validate the markup and additional styling with CSS will also be needed.

#27 pmurphy

pmurphy

    Advanced Member

  • Members
  • 47 posts

Posted 21 October 2011 - 08:05 AM

Thank you Danny. Your solution works for me. Here is what I finally did. In template.branding.php, I replaced with the following:

I appreciate your help!

#28 Danny

Danny

    Is Awesome!

  • Moderators
  • 17977 posts

Posted 21 October 2011 - 08:14 AM

No problem, happy to help! Also I would recommend doing the following as if there an update to PlatformPro, this update will most likely overwrite the code you added to the file. To get around this, you can do a template override, to do this simply following the instructions below. Download and then upload your copy of template.branding.php to /wp-content/themes/platformbase, this will now override any updates in the future to Platform Pro.

#29 pmurphy

pmurphy

    Advanced Member

  • Members
  • 47 posts

Posted 21 October 2011 - 07:25 PM

Thanks!

#30 dainiswmichel

dainiswmichel

    Super Member

  • Members

  • 189 posts

Posted 11 August 2012 - 09:00 PM

tried to find the same procedure for the latest framework - not found yet.