WordPress.org

Ready to get started?Download WordPress

Forums

plugin to set the H1 on single posts and pages (9 posts)

  1. zimzum
    Member
    Posted 5 years ago #

    Does anyone know of a plugin that will allow me to set the h1 tags on my single posts and pages, rite now every page has the blog title as h1 which is not good for the search engines.

    I tried the hack in the link below, but it's not working rite on my theme. I do not have much php knowledge, so unless I had the exact theme they used in this tutorial, it probably is not gonna happen for me.

  2. zimzum
    Member
    Posted 5 years ago #

    sorry this was the link
    link

  3. zimzum
    Member
    Posted 5 years ago #

    when it says change this:

    <h1>"><?php bloginfo('name'); ?></h1>

    to this:

    <?php if(is_home()) : ?>
    <h1>"><?php bloginfo('name'); ?></h1>
    <?php else : ?>
    <span id="blogTitle">
    "><?php bloginfo('name'); ?>
    </span>
    <?php endif; ?>

    down below is what im dealing with in my header.php, the <h1 id="name-text" class="logo-name"> is throwing me way off.

    my header.php

    <div class="logo">
    <h1 id="name-text" class="logo-name">
    /"><?php bloginfo('name'); ?></h1>
    <div id="slogan-text" class="logo-text">
    <?php bloginfo('description'); ?></div>
    </div>
    <div class="topA"><?php include (TEMPLATEPATH . '/adsense728.php'); ?> </div>

  4. Dagon Design
    Member
    Posted 5 years ago #

    The text it is talking about changing is not your actual page title (in the header.php file), it is just where it shows your title above your content. So you would need to change it in your other template files, such as index.php

  5. zimzum
    Member
    Posted 5 years ago #

    thanks,
    I understand that, its just that the <h1 id="name-text" class="logo-name"> is confusing to me. if I remove the h1 from id= , my header dissapears and if I leave it, then the h1 shows up when I check source, although the h1=id does not have a closing tag and the posts and pages are getting the h1 tag where I want them to. But I am wondering if the search engine is still reading the h1 id= as h1 also?

    Another problem is that on my single posts and pages, the blog description shifts all the way to the right for some reason, its perfectly fine on the homepage.

    But for what its worth , it would be working fine for me if that h1=id did not show in source and the blog description did not shift all the way to the left.

    So close, yet so far away, thats why I was hoping there was a plugin.

  6. zimzum
    Member
    Posted 5 years ago #

    Tihs is what the source shows on my home page

    <div class="logo">
    <h1 id="name-text" class="logo-name">

    blog</h1>
    <div id="slogan-text" class="logo-text">
    blog description</div>
    </div>

    I am just wonderig if the search engine is counting the h1 without the </h1>,if its not then I would be good to go minus the desciption shift.

    source page for single post
    <div class="logo">
    <h1 id="name-text" class="logo-name">

    <span id="blogTitle">
    blog

    </span>
    <div id="slogan-text" class="logo-text">
    blog description</div>

  7. Dagon Design
    Member
    Posted 5 years ago #

    I am not sure what you mean.

    Can you wrap code tags around the code, so it will display properly?

    You could always just change the h1's to p's

  8. zimzum
    Member
    Posted 5 years ago #

    Hi Dagon,

    I got it to work well, but I am having major problems with the blog title text. The text is blue and is aligned all the way to the far left no matter what I do.

    This

    <div class="logo">
    <h1 id="name-text" class="logo-name">

    was calling this in the style sheet

    /* begin Logo */
    .logo {
    display : block;
    position: absolute;
    left: 0px;
    top: 60px;
    width: 880px;
    max-height: 160px;
    }
    h1.logo-name {
    position:relative;
    left: 350px;

    }
    h1.logo-name, h1.logo-name a, h1.logo-name a:link, h1.logo-name a:visited, h1.logo-name a:hover {
    font-family: times new roman,Helvetica,sans-Serif;
    font-size: 41px;
    font-style: normal;
    font-weight: medium;
    text-decoration: none;
    padding:0;
    margin:0;
    color: #FFffff !important;
    }

    Now that I changed

    <h1 id="name-text" class="logo-name">

    to

    <p id="name-text" class="logo-name">

    it's not calling.


    I tried adding the css code to the bottom of my stle sheet like the hack says, but no matter what I change on it, nothing happens.

    span#blogTitle {
    display: block;
    font-size: 4em;
    text-align: center;
    padding-top: 70px;
    font-weight: bold;
    font-family: 'Trebuchet MS','Lucida Grande',Verdana,Arial,Sans-Serif;
    }
    span#blogTitle a {
    color: white;
    text-decoration: none;
    }
    span#blogTitle a:hover {
    text-decoration: none;
    }

    .post h1 {
    color: #333333;
    text-decoration: none;
    font-size: 1.6em;
    text-align: left;
    padding-top: 0;
    }

  9. Dagon Design
    Member
    Posted 5 years ago #

    Could I see a link?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.