test
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • lucine Friend
    #157615

    Hi,

    I noticed that the H1 tag of my website is always the same : the name of the website set in the global configuration. How can I fix that in order to set a different H1 tag for each page ?

    Thanks in advance for your answer.

    aman204 Friend
    #367497

    You can add on class attribute for h1 tags like this::

    h1.new{font-size:20px;font-weight:bold;}

    and then, use the above attribute for html embedding like this::

    <h1 class=”new”>Your text here..</h1>

    Update above properties accordingly

    Also, Where do you wish to see h1 tag differently ?

    lucine Friend
    #367526

    Hi, thanks for your answer.

    The problem that is each page has the same H1 tag. It’s very bad for seo. I just need to set my custom H1 tag with tinymce…

    I have noticed that in the index php, I have the following code :

    <?php
    $siteName = $tmpTools->sitename();
    if ($tmpTools->getParam(‘logoType’)==’image’) { ?>
    <h1 class=”logo”>
    <a title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
    </h1>
    <?php } else {
    $logoText = (trim($tmpTools->getParam(‘logoText’))==”) ? $config->sitename : $tmpTools->getParam(‘logoText’);
    $sloganText = (trim($tmpTools->getParam(‘sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $tmpTools->getParam(‘sloganText’); ?>
    <div class=”logo-text”>
    <p class=”site-slogan”><?php echo $sloganText;?></p>
    <h1>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a>
    </h1>
    </div>
    <?php } ?>

    Should I delet this code ?

    I hope that you understand my problem.

    Thanks for your answer.

    aman204 Friend
    #367542

    From the above code, Do you wish to mainly change h1 tag settings for logo area ?

    <blockquote>Should I delet this code ?</blockquote>

    Removing the code given would result in removal of logo

    lucine Friend
    #367555

    Hi Aman,

    Ok I understand but so what is the way to delet this H1 generated tag with the name of the logo ?
    I don’t want this H1 tag in my web pages, but need to set my own H1 tag for each page !

    If I decide to set a H1 tag with my editor Tinymce (for example “PRODUCTS”), the result is that I have 2 H1 tag and that is very bad to !

    I hope you could help me to solve this very embarrassing problem…

    Regards

    aman204 Friend
    #367560

    You can go to the file where the code is located and change this::

    <h1 class=”logo”>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
    </h1>

    to

    <div class=”logo”>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
    </div>

    and then, remove in h1 references from here in template.css file around line 1209

    /* Logo Image —*/
    h1.logo { height: 51px; margin-top: 20px; margin-left: 10px; width: 187px; }
    h1.logo a {background: url(../images/logo.png) no-repeat left;display: block;height: 51px;width: 187px;}
    h1.logo a span { position: absolute; top: -1000px; }

    lucine Friend
    #367574

    Hi Aman,

    Thank you so much for your investment but your fix doesn’y work :

    If I follow your instruction, the result is that the header with the logo desappaers…

    I am certain that the solution is not far, but I don’t know what to do.

    Regards

    aman204 Friend
    #367587

    I have added the updated css reference. Please check if it is done fine::

    /* Logo Image —*/
    .logo { height: 51px; margin-top: 20px; margin-left: 10px; width: 187px; }
    .logo a {background: url(../images/logo.png) no-repeat left;display: block;height: 51px;width: 187px;}
    .logo a span { position: absolute; top: -1000px; }

    lucine Friend
    #367603

    Hi Aman,

    Thank you so much !!! That’s working perfect !

    Now I can set my custom H1 tag !!!!

    Best regards

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 2 voices, and was last updated by  lucine 14 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum