0
Welcome Guest! Login
0 items Join Now

You are not authorized to access that page, please login...

H2 Article Titles

    • Tony Sova's Avatar
    • Tony Sova
    • Jr. Rocketeer
    • Posts: 42
    • Thanks: 0

    H2 Article Titles

    Posted 12 years 2 months ago
    • Hello,

      I'm just wondering why templates generate H2 tags for titles when it's best to use H1 for SEO purposes.

      Also, what is the easiest way to fix on the sites without modifying the PHP?

      Thanks!
      Tony
    • cdavis411's Avatar
    • cdavis411
    • Preeminent Rocketeer
    • Posts: 17787
    • Thanks: 882

    Re: H2 Article Titles

    Posted 12 years 2 months ago
    • well page titles are h1. the menu items generate those. so if you are using a blog layout then h2 is better and module titles are h2 also so you do not have a bunch of h1 elements on a single page
    • Tony Sova's Avatar
    • Tony Sova
    • Jr. Rocketeer
    • Posts: 42
    • Thanks: 0

    Re: H2 Article Titles

    Posted 12 years 2 months ago
    • OH! I know what happened. I reversed the content so that the text was in a module because I was linking to an extension.

      Thanks!
    • cdavis411's Avatar
    • cdavis411
    • Preeminent Rocketeer
    • Posts: 17787
    • Thanks: 882

    Re: H2 Article Titles

    Posted 12 years 2 months ago
    • Happy to help :cheesy:
    • Tony Sova's Avatar
    • Tony Sova
    • Jr. Rocketeer
    • Posts: 42
    • Thanks: 0

    Re: H2 Article Titles

    Posted 12 years 2 months ago
    • OK I spoke too soon. :)

      On my home page I'm showing just a single article but it's still putting the title in H2 tags. http://www.softwiredweb.com

      Thanks for your help!
    • cdavis411's Avatar
    • cdavis411
    • Preeminent Rocketeer
    • Posts: 17787
    • Thanks: 882

    Re: H2 Article Titles

    Posted 12 years 2 months ago
    • yes but if you set the page itle in the page display options off the menu item it is h1. This is done by design. articles are h2 because of the various ways article titles may be renders or called in Joomla. (e.g., blog layout has several article title on one page or a latest or popular articles type of module will also show several article titles on one page. )

      you can change if you like though in the template's html override for com_content
    • ggbaron's Avatar
    • ggbaron
    • Newbie
    • Posts: 4
    • Thanks: 0

    Re: H2 Article Titles

    Posted 12 years 1 month ago
    • I have the same problem: I am a Main Menu and I am using modules without article.
      the two modules in the home page have H2 title.
      Can you please tell me better how I can set them as H1 ?
      Thanks
    • Last Edit: 12 years 1 month ago by ggbaron.
    • cdavis411's Avatar
    • cdavis411
    • Preeminent Rocketeer
    • Posts: 17787
    • Thanks: 882

    Re: H2 Article Titles

    Posted 12 years 1 month ago
    • ggbaron wrote:
      I have the same problem: I am a Main Menu and I am using modules without article.
      the two modules in the home page have H2 title.
      Can you please tell me better how I can set them as H1 ?
      Thanks

      you can change the file: <root joomla>/templates/TEMPLATENAME/html/modules.php

      find this:
      <div class="module-content">
                     <?php if ($module->showtitle != 0) : ?>
                     <h2 class="title"><?php echo $module->title; ?></h2>
                     <?php endif; ?>

      change to this:
      <div class="module-content">
                     <?php if ($module->showtitle != 0) : ?>
                     <h1 class="title"><?php echo $module->title; ?></h1>
                     <?php endif; ?>
      that will chage the title tag for every module jfyi
    • ggbaron's Avatar
    • ggbaron
    • Newbie
    • Posts: 4
    • Thanks: 0

    Re: H2 Article Titles

    Posted 12 years 1 month ago
    • Thanks a lot. it works fine
    • cdavis411's Avatar
    • cdavis411
    • Preeminent Rocketeer
    • Posts: 17787
    • Thanks: 882

    Re: H2 Article Titles

    Posted 12 years 1 month ago
    • Happy to help :cheesy:

Time to create page: 0.071 seconds