Close

Replace that darned ContentHeading tag with a H1 or H2

Joomla has a reputation for being a difficult platform from an SEO perspective. To be honest alot of that is a myth and alot of it is due to the prevalence of javascript heavy templates and extensions being used on Joomla websites (remember, search engines don’t like having to read through reams of code to find your content).

The default Joomla SEF settings go a long way to remedy this and there are third party extensions available for those who want to get more advanced and have more control over tags, titles, etc. One thing has always baffled me about Joomla though. Why on Earth are page titles automatically set to div class=contentheading? Why not give the option to use a h1 or a h2. Google et al love headings so I’m condfused as to why the good folks in the development team chose this method of titling a page. Don’t get me wrong, I’m not saying that this is a mistake, I just don’t know why this approach was taken. If someone has the answer please do post it in the comments.

Anyway, I was playing around with the core files (yes I know, I shouldn’t hack core files!!!!) to find a way to change these divs to headings. Pretty simple really.

Edit: someone’s beaten me to it. Have a look at the next link and change your files to match (j1.5). I’d suggest you put these into a template override rather than the core however. Core hacks are the work of the devil 😉

http://www.joomlaarchive.com/joomla-tips/52-changing-contentheading-to-h1.html

Compatibility: Joomla 1.5

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.