Forum Support

Shape 5
March 29, 2024, 08:14:59 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to change H2 header to H1  (Read 582 times)
bollinger
Jr. Member
**
Offline Offline

Posts: 92



« on: March 22, 2016, 11:48:08 AM »

Hi, for SEO is there a way to make headers h1 and not h2, easily?

Any experience or feedback would be great!

enmu.edu

Matthew
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #1 on: March 23, 2016, 07:39:30 AM »

Hello,

Not through the template, those are actually outputted directly through Joomla itself.
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
bollinger
Jr. Member
**
Offline Offline

Posts: 92



« Reply #2 on: March 23, 2016, 08:13:33 AM »

Ok, thank you.
Logged
gsquad
Jr. Member
**
Offline Offline

Posts: 37



« Reply #3 on: July 14, 2016, 08:16:30 PM »

This may be a little late, I was looking for the same solution. Since there was no real solution, I figured I'd contribute Smiley

This can be achieved fairly easily by creating a template override. You will need FTP access and a basic understanding of HTML. Overrides do not mess with the Joomla core or your Template's core files, so it's a pretty safe practice to make tweaks to the core functionality of Joomla within a template.

  • Go to Extensions > Templates
  • On the left sidebar menu, switch from Styles to Templates
  • Click on the Title of the template you are using
  • Click on the tab "Create Overrides"
  • Under Components, Click on com_content (it will open the folder)
:
  • Click on "article" -- Joomla with generate the override file for you and show you where it's located. Ex: Override created in /templates/your_template/html/com_content/article
  • Got to that folder via FTP open it and edit the default.php file.

When you have the default.php file open in your favorite text editor, change the following code (Should be the same, but may be slightly different, I'm using the general Contractor template):

Code:
<?php if ($params->get('show_title')) : ?>
<h2 itemprop="name">
<?php echo $this->escape($this->item->title); ?>
</h2>
<?php endif; ?>

To this:

Code:
<?php if ($params->get('show_title')) : ?>
<h1 itemprop="name">
<?php echo $this->escape($this->item->title); ?>
</h1>
<?php endif; ?>

Save your override file and refresh your site, you should be good to go.

Overrides are great, one of the reasons I've stayed in the Joomla camp for years. If you mess up, just delete the override files and start the process again.

If you have any questions, feel free to ask.

Take care,
john
Logged
cspgsl
Jr. Member
**
Offline Offline

Posts: 903



« Reply #4 on: September 20, 2016, 06:49:07 AM »

Thanks for this John - always learning

This may be a little late, I was looking for the same solution. Since there was no real solution, I figured I'd contribute Smiley

This can be achieved fairly easily by creating a template override. You will need FTP access and a basic understanding of HTML. Overrides do not mess with the Joomla core or your Template's core files, so it's a pretty safe practice to make tweaks to the core functionality of Joomla within a template.

  • Go to Extensions > Templates
  • On the left sidebar menu, switch from Styles to Templates
  • Click on the Title of the template you are using
  • Click on the tab "Create Overrides"
  • Under Components, Click on com_content (it will open the folder)
:
  • Click on "article" -- Joomla with generate the override file for you and show you where it's located. Ex: Override created in /templates/your_template/html/com_content/article
  • Got to that folder via FTP open it and edit the default.php file.

When you have the default.php file open in your favorite text editor, change the following code (Should be the same, but may be slightly different, I'm using the general Contractor template):

Code:
<?php if ($params->get('show_title')) : ?>
<h2 itemprop="name">
<?php echo $this->escape($this->item->title); ?>
</h2>
<?php endif; ?>

To this:

Code:
<?php if ($params->get('show_title')) : ?>
<h1 itemprop="name">
<?php echo $this->escape($this->item->title); ?>
</h1>
<?php endif; ?>

Save your override file and refresh your site, you should be good to go.

Overrides are great, one of the reasons I've stayed in the Joomla camp for years. If you mess up, just delete the override files and start the process again.

If you have any questions, feel free to ask.

Take care,
john
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.