Page 1 of 1

Change the Article Titles to Headings

Posted: Tue Oct 10, 2006 8:28 am
by velonis
I am new in the forum but I made a search and I found nothing about this topic.

I have made the following small hack to show the article titles as headings.

In  components/com_content/content.html.php  , line 609  I changed the following:

get( 'pageclass_sfx' ); ?>" width="100%">                    link_on;?>" class="contentpagetitleget( 'pageclass_sfx' ); ?>">                        title;?>

with this:

get( 'pageclass_sfx' ); ?>" width="100%">                      link_on;?>" class="contentpagetitleget( 'pageclass_sfx' ); ?>">                      title;?>       



Then a few lines after (line 617), I changed this:
get( 'pageclass_sfx' ); ?>" width="100%">                    title;?>   

with this:

get( 'pageclass_sfx' ); ?>" width="100%">                        title;?>                                                                                            


You don't have to use h2. You can use h1 or h3 etc

Before this hack  my sitescore from silktide always showed that the webpages lack of headings. Is this option (showing the title as heading) added on Joomla 1.5 ? It is an option in a blog module but I don't use this module.

I found another small hack about changing the order of the webpage's  title from sitename-title to title-sitename but I don't know if it makes a big difference to SEO.



(more details in http://velonis.gr/webapps/a-small-jooml ... r-seo.html)

Re: Change the Article Titles to Headings

Posted: Sun Dec 10, 2006 3:46 am
by Templecloud
Hi Velonis,

This looks like the problem I am trying to fix but can you confirm whether this alters the size of the contentheading on the Frontpage and in the Blog etc - as I'd like those to remain the original size and just have an H1 title on my article pages?

Maybe I'll give it a try and see.

Thanks for this - it certainly points me to the place to alter these settings which I hadn't found before.

Templecloud

Re: Change the Article Titles to Headings

Posted: Mon Jan 15, 2007 11:48 pm
by baijianpeng
I really like this hack. But when I opened that file,  there are three positions shows the first ling of code you mentioned and none of them located at line 609.

I am using Joomla 1.0.12 and just applied Joomla SEF Patch of 1.0.12 yestoday.

Do I need to do this hack after that patch? If I should, How?

Thank you very much.

Re: Change the Article Titles to Headings

Posted: Tue Jan 30, 2007 4:01 pm
by sketman
Hello,

I believe that this matter with h1 and h2 tags should not be underestimated.

You may agree when I say that most of the visitors is comming to the web site through search engines. As long as I know, search engines, especially Google, pay high attention to the h1 - hn tags. These tags are one of the most important ways how to tell search engines what is the particular web page about. Google puts a high weight to h1, h2 and h3 tags when indexing the site content.

From this point of view it seems to be a certain disadvantage of Joomla, because ".cotentheading" does not tells much to Google. I believe that Google does not devaluate it to the level of normal body text, because see that .contentheading has a bigger and bold style font. However I am sure that Google does not pay to such a heading the attention, and does not value it the same level, as it would value the h1 or h2 tags...

Is there please any information how this will be handled in Joomla 1.5? Are there any plans to change this?

Also, I would appreciate very much some comments of the Joomla team members to the first post in this thread. Is the solution that Velonis suggests good? I have tried it at my test site and it worked, but I got font size and colors changed... Might there be some other, better way to change .contenheading to h1 or h2 tag?

Thank you very much

Re: Change the Article Titles to Headings

Posted: Wed Feb 28, 2007 3:41 pm
by apc
I just asked this same question in another post; not knowing about this one.

I agree, from an SEO point of view having the Title in an H1 tag is almost crucial and definitely needs to be in 1.5 and better still any update to the current version.

Re: Change the Article Titles to Headings

Posted: Wed Apr 25, 2007 12:21 pm
by sgpratley
Looks like just what I need

One amend though, on a blog page I only want the page title to be H1, and the article titles to be H2
then on the article's own page I want the title to be H1

e.g. on this page 'Partner #1' should be an H2
http://www.immediatefuture.co.uk/index. ... &Itemid=10

on this page Partner #1 should be an H1
http://www.immediatefuture.co.uk/index. ... &Itemid=10

Any help greatly appreciated, the structural markup of headings is probably the last SEO hurdle I need to make some really hot SEO sites in Joomla.

Re: Change the Article Titles to Headings

Posted: Wed Jun 20, 2007 2:37 pm
by baijianpeng
Hi, velonis,

I had applied your hack to my website http://www.joomlagate.com and it works very well. Thank you very much !

I also visited your website mentioned above. But I did not find your hack to change the sequence of sitename-article heading to article heading - sitename. Would you please give me more detailed description about this hack ?

Or did I missed some link on your website ?

Thank you.

Re: Change the Article Titles to Headings

Posted: Sat Aug 18, 2007 9:08 pm
by findhelp
I've been an SEO for years working in the drug addiction treatment field, an extremely competitive topic on search engines.  Using techniques such as these on my site http://www.treatment-centers.net  (you may note extensive use of h1,2 and 3 tags, on all content pages of the site) I've gotten this public benefit drug addiction treatment help site to garner 50,000+ unique visits per month.  I'm porting the site over to Joomla, and have already incorporated a number of SEO related hacks, this one is extremely useful and powerful for ranking purposes.  Thanks so much!

Re: Change the Article Titles to Headings

Posted: Tue Oct 30, 2007 10:08 pm
by ewel
This SEO tip also works great for CSS!

I appreciate the usefulness of it for SEO, but I found it as a solution for a css issue I wanted to solve.

What I wanted was to give a different style to titles in blog view than in full article view. In full article view I wanted to have another colour and a large font size, and in the blog view of the article intro's I have two columns so I wanted a font size small enough to fit.

Thanks to your tip I achieved this by using the h1 tag for the non-linking article title and the h2 tag for the linking article title (the one with 'a href' in it of course).

Thanks for posting this great tip

Re: Change the Article Titles to Headings

Posted: Thu Nov 22, 2007 7:09 pm
by jumatmajid
Hi,

Just want to add my two cents as a joomla newbie... :D

In Joomla! 1.5 the same hack can be made in this file /components/com_content/views/article/tmpl/default.php

The changes that I've made are in red...


  #bg
  {
    background: url(http://xxxxx/templates/s5_digital_syste ... tlebar.gif) no-repeat scroll top left;
  }


        params->get( 'pageclass_sfx' ); ?>" width="100%" valign=top lineheight=normal>
        &nbsp&nbsp
params->get('link_titles') && $this->article->readmore_link != '') : ?>
article->readmore_link; ?>" class="contentpagetitleparams->get( 'pageclass_sfx' ); ?>">
escape($this->article->title); ?>


escape($this->article->title); ?>



I've been facing problem with article titles are not prominent enough and generally its not a good idea to have the title in the article body itself...

Glad to find this hack and thank you for posting a great tip...hope the addition is helpful too...chiao...

Re: Change the Article Titles to Headings

Posted: Fri Nov 23, 2007 1:30 am
by baijianpeng
Thanks, this is a good solution.


But where is the closing tag of ?

And, I want to add H1 tag for titles on frontpage, how to ?

Thanks.

Re: Change the Article Titles to Headings

Posted: Fri Nov 23, 2007 4:59 am
by jumatmajid
Since its in TD so no worries about closing the but if you really need it you can add just before [sample below]


  #bg
  {
    background: url(http://xxxxx/templates/s5_digital_syste ... tlebar.gif) no-repeat scroll top left;
  }


        params->get( 'pageclass_sfx' ); ?>" width="100%" valign=top lineheight=normal>
        &nbsp&nbsp
      params->get('link_titles') && $this->article->readmore_link != '') : ?>
      article->readmore_link; ?>" class="contentpagetitleparams->get( 'pageclass_sfx' ); ?>">
        escape($this->article->title); ?>
     
     
        escape($this->article->title); ?>
     
 
 

You can change the frontpage title attribute from your template CSS file. Look for something like this in your template CSS file and edit accordingly. Normally located in /template/[templatename]/css/[cssfile]. This will only affect frontpage of the selected template.

table.blog .contentheading, h2 {
    background:url(../images/titlebar.gif) no-repeat;
    font-size:1.4em;
    font-weight:bold;
    line-height:normal;
color: #ffffff;
padding-left: 25px;

Good luck...
baijianpeng wrote: Thanks, this is a good solution.


But where is the closing tag of ?

And, I want to add H1 tag for titles on frontpage, how to ?

Thanks.

Re: Change the Article Titles to Headings

Posted: Fri Nov 23, 2007 5:34 am
by baijianpeng
Ok, got it. Thank you very much.