Agregar color y etiqueta H1 al título de un artículo Joomla

As most SEO experts believe, H1 tag on a website article title is given more weight by search engines, particularly Google. I believe it too. Most of my articles here at JoomlaHacks.com comes out on page one in Google on every keywords I targeted. But Joomla does not tag the article title with H1. Instead they enclose it with <td class=”contentheading”></td>. Here’s a short tutorial hack on how you can enclose it with H1 tag.

There are several ways. One way is using the template override, but this involves serious coding. So I will teach you the fast way, or the hacker way. This is for Joomla 1.5.x.

Edit the file /www/components/com_content/views/article/tmpl/default.php. On line number 14, you will see the following code:

14         <?php if ($this->params->get(‘show_title’)) : ?>
15         <td width=”100%”>
16                 <?php if ($this->params->get(‘link_titles’) && $this->article->readmore_link != ”) : ?>
17                 <a href=”/<?php echo $this->article->readmore_link; ?>” class=”contentpagetitle<?php echo $this->params->get( ‘pageclass_sfx’ ); ?>”>
18                         <?php echo $this->escape($this->article->title); ?></a>
19                 <?php else : ?>
20                         <?php echo $this->escape($this->article->title); ?>
21                 <?php endif; ?>
22         </td>
23         <?php endif; ?>

Modify that part by adding H1 tag.

14         <?php if ($this->params->get(‘show_title’)) : ?>
15         <td width=”100%”>
16                 <h1 style=”color:#1689de” ><?php if ($this->params->get(‘link_titles’) && $this->article->readmore_link != ”) : ?>
17                 <a href=”/<?php echo $this->article->readmore_link; ?>” class=”contentpagetitle<?php echo $this->params->get( ‘pageclass_sfx’ ); ?>”>
18                         <?php echo $this->escape($this->article->title); ?></a>
19                 <?php else : ?>
20                         <?php echo $this->escape($this->article->title); ?>
21                 <?php endif; ?></h1>
22         </td>
23         <?php endif; ?>

If you don’t like the format of H1, just define its CSS formatting in your template css file.

Remember, when you upgrade Joomla and default.php file was changed, this will overwrite your changes. If that happens, just edit the same file again.

Just a note, adding H1 is not the only technique in SEO. There are more to it. Maybe I will tackle this topic next time to share my expertise.

Fuente:

Joomla Hacks

W3Schools

Ejemplo: D.P.O.S.S.

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s

A %d blogueros les gusta esto: