0
Welcome Guest! Login
0 items Join Now

Putting titles in an H1 tag

    • Adrian Cooper's Avatar
    • Adrian Cooper
    • Elite Rocketeer
    • Posts: 531
    • Thanks: 0
    • Technologist, Published Author

    Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • I think Joomla should already put a page title in an H1 tag because clearly that is the right thing to do, especially for SEO.

      I hacked the code to do just that and center it at the same time, but because I hard coded it the css settings have no influence at all as you might expect.

      Can I hack the code where I hard coded by H1 tags to have Joomla use the CSS of the template?

      I need to be able to reduce the font size of the H1 tag of the title to the font size of the theme H1 tag.

      Thanks.
    • www.ourultimatereality.com
    • GollumX's Avatar
    • GollumX
    • Elite Rocketeer
    • Posts: 2817
    • Thanks: 0

    Re: Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • thats strange.

      the contentheading (or componentheading) can be customized with css so if you simply replaced them with H1 tags one would normally expect the H1 to be equally customisable.

      I'll be doing this soon myself and will report back on my experience.
    • Say no to Internet Explorer 6.
      twitter.com/mark_up
    • urj2ic8's Avatar
    • urj2ic8
    • Hero Rocketeer
    • Posts: 421
    • Thanks: 0

    Re: Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • Adrian Cooper wrote:
      I think Joomla should already put a page title in an H1 tag because clearly that is the right thing to do, especially for SEO.

      i agree i'd love to see an easy way to change this.
    • Billy Zoellers
    • GollumX's Avatar
    • GollumX
    • Elite Rocketeer
    • Posts: 2817
    • Thanks: 0

    Re: Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • There is a hack that does this that I learnt a few days ago. Unfortunately, I'm not sure I should share it with you since I found it in a commercial Joomla SEO ebook that was gifted to me by the author. If I had paid for the book i'd most certainly have shared it.

      The book is written by Steve Burge over at www.alledia.com (where you'll also find an interview with our very own Andy Miller). I very highly recommend it for anyone serious about SEO. The book is clear, concise, and filled with great tips.

      Some may consider the ebook expensive, but for people running commercial sites, it's a small price to pay.. we all know that "If you build it, they will come" does not apply to websites.

      If you really can't afford the book, the hack is also available on the joomla.or forums... time for some serious searching.

      NOTE: at the time of posting this, Alledia.com seems to be down.
    • Say no to Internet Explorer 6.
      twitter.com/mark_up
    • Adrian Cooper's Avatar
    • Adrian Cooper
    • Elite Rocketeer
    • Posts: 531
    • Thanks: 0
    • Technologist, Published Author

    Re: Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • I can share the hack I used:

      in components/com_content:

      line 613 to 615

      Replace:

      <td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
      <?php echo $row->title;?>
      <?php HTML_content::EditIcon( $row, $params, $access ); ?>
      With:

      <td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
      <h1><?php echo $row->title;?></h1> <?php HTML_content::EditIcon( $row, $params, $access ); ?>

      My question really is; how do I control the size of the H1 font in the css?
    • www.ourultimatereality.com
    • GollumX's Avatar
    • GollumX
    • Elite Rocketeer
    • Posts: 2817
    • Thanks: 0

    Re: Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • Adrian Cooper's Avatar
    • Adrian Cooper
    • Elite Rocketeer
    • Posts: 531
    • Thanks: 0
    • Technologist, Published Author

    Re: Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • Adrian Cooper's Avatar
    • Adrian Cooper
    • Elite Rocketeer
    • Posts: 531
    • Thanks: 0
    • Technologist, Published Author

    Re: Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • [GollumX wrote:
      Same thing.

      velonis.gr/joomla-tips/a-small-joomla-hack-for-seo-2.html

      Line numbers may vary. Let us know if the H1/H2 tags are customizable via css after this hack.

      It looks as if the css does influence the hard coded tags, but they seem out of sync somehow. After the hack the H1 font is huge. If I reduce the size of the H1 font in the css to a reasonable size, the H1 tags I have used in the editor are much too small.

      This is a very necessary hack for anyone that cares about SEO, so we need to get this right.
    • www.ourultimatereality.com
    • phlux0r's Avatar
    • phlux0r
    • Sr. Rocketeer
    • Posts: 199
    • Thanks: 0

    Re: Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • You should be able to target your H1 contentheading tag in CSS like so:

      .contentheading h1 {
      your style here;
      }

      BTW, I recently discovered a version of Joomla that has been changed/hacked for accessibility. It's called a8e Joomla and you can get it here; www.a8ejoomla.com/ It's got all the tables removed and replaced with proper CSS styles and has h1 tags for titles etc...
    • Adrian Cooper's Avatar
    • Adrian Cooper
    • Elite Rocketeer
    • Posts: 531
    • Thanks: 0
    • Technologist, Published Author

    Re: Putting titles in an H1 tag

    Posted 17 years 6 months ago
    • phlux0r wrote:
      You should be able to target your H1 contentheading tag in CSS like so:

      .contentheading h1 {
      your style here;
      }

      BTW, I recently discovered a version of Joomla that has been changed/hacked for accessibility. It's called a8e Joomla and you can get it here; www.a8ejoomla.com/ It's got all the tables removed and replaced with proper CSS styles and has h1 tags for titles etc...

      The issue I seem to have is that H1 in the css is currently set to 160% which is fine.

      After this hack the Title font size is huge. If I reduce the H1 in css to say 120%, the Title is then fine but my H1 tags I added from the editor are now way too small.

      Any idea how to make them the same size?

      Thanks!
    • www.ourultimatereality.com

Time to create page: 0.060 seconds