Anyone that have experience with Blogger Template codes?

Discussion in 'HTML & Website Design' started by tonyhlav, Mar 12, 2013.

  1. #1
    I have problem with my post title <h2> tag, if i change it to <h1> it changes on the homepage too, and the homepage is with multiple h1 tags.

    Anyone?
    Thanks
     
    Solved! View solution.
    tonyhlav, Mar 12, 2013 IP
  2. rohitink

    rohitink Active Member

    Messages:
    370
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Use and Id for the h1 tag. Something like <h1 id="postTitle">, and separate ids for Homepage.
     
    rohitink, Mar 12, 2013 IP
  3. tonyhlav

    tonyhlav Member

    Messages:
    49
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    28
    #3
    hmm...

    This is the code:

      <div class='post hentry'>
        <a expr:name='data:post.id'/>
        <b:if cond='data:post.title'>
          <h2 class='post-title entry-title'>
        <b:if cond='data:post.link'>
          <a expr:href='data:post.link'><data:post.title/></a>
        <b:else/>
            <b:if cond='data:post.url'>
              <a expr:href='data:post.url'><data:post.title/></a>
            <b:else/>
              <data:post.title/>
            </b:if>
        </b:if>
          </h2>
        </b:if>
    Code (markup):
     
    tonyhlav, Mar 12, 2013 IP
  4. #4
    use this code instead of code you are posted here

    <div class='post hentry'>
    <a expr:name='data:post.id'/>
    <b:if cond='data:post.title'>
    <b:if cond='data:blog.pageType == &quot;item&quot;'>
    <h1 class='post-title entry-title'>
    <b:if cond='data:post.link'>
    <a expr:href='data:post.link'><data:post.title/></a>
    <b:else/>
    <b:if cond='data:post.url'>
    <b:if cond='data:blog.url != data:post.url'> <a expr:href='data:post.url'><data:post.title/></a> <b:else/> <data:post.title/> </b:if>
    <b:else/>
    <data:post.title/>
    </b:if>
    </b:if>
    </h1>
    <b:else/>
    <h2 class='post-title entry-title' itemprop='name'>
    <b:if cond='data:post.link'>
    <a expr:href='data:post.link'><data:post.title/></a>
    <b:else/>
    <b:if cond='data:post.url'>
    <a expr:href='data:post.url'><data:post.title/></a>
    <b:else/>
    <data:post.title/>
    </b:if>
    </b:if>
    </h2>
    </b:if>
    </b:if>



    and for the homepage use this

    <div id='header-inner'>
    <b:if cond='data:blog.url == data:blog.homepageUrl'>
    <h1 style='text-indent:-9999px; height:0; margin:0; padding:0;display: block'>put Your Anchor Text Here - BloggerTipsTricks.com</h1>
    <a expr:href='data:blog.homepageUrl' style='display: block'>
    <img alt='blogger tips and tricks' expr:height='data:height' expr:id='data:widget.instanceId + &quot;_headerimg&quot;' expr:src='data:sourceUrl' expr:width='data:width' style='display: block'/>
    </a>
    <b:else/>
    <a expr:href='data:blog.homepageUrl' style='display: block'>
    <img alt='blogger tips and tricks' expr:height='data:height' expr:id='data:widget.instanceId + &quot;_headerimg&quot;' expr:src='data:sourceUrl' expr:width='data:width' style='display: block'/>
    </a>
    </b:if>
     
  5. merlin77

    merlin77 Active Member

    Messages:
    54
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    78
    #5
    If you want to change all the titles then follow these steps -
    1. open your css file and find your H1 css and copy it to notepad
    2. create a css class such as .myh1tag and paste the code you just copied in it and save it
    3. then change this line
    <h2 class='post-title entry-title'>
    into this line
    <h2 class='myh1tag post-title entry-title'>
    *make sure there is a space between your class and the word post-title

    Save and close. That should do it.
     
    merlin77, Mar 12, 2013 IP
  6. tonyhlav

    tonyhlav Member

    Messages:
    49
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    28
    #6
    Thanks!
     
    tonyhlav, Mar 12, 2013 IP