How to make something only appear on the homepage

Discussion in 'HTML & Website Design' started by kytro360, Nov 6, 2010.

  1. #1
    First of all i use blogger/blogspot.

    i added an optin form to my blog but only want it to appear on the homepage not on posts.

    this is my code, please tell me what i need to do:

    <b:if cond='data:blog.url == data:blog.homepageurl'>
    
    
    <div style='background-color: #ccff66; border: 3px solid gray;'>
    <h3 style='font-weight: normal; text-align: center;'>
    <b>Get your copy of the <i>&quot;Customize It Your Way&quot; E-book</i>.</b></h3>
    <div class='separator' style='clear: both; text-align: center;'>
    </div>
    <a href='http://3.bp.blogspot.com/_j7hloep4obk/s9yqdeugm-i/aaaaaaaaaz8/qis-agxqgwi/s1600/google_notebook.png' imageanchor='1' style='clear: left; float: left; margin-bottom: 1em; margin-right: 1em;'><img border="0" src="http://3.bp.blogspot.com/_J7HLOep4oBk/S9YQdeugM-I/AAAAAAAAAZ8/QiS-aGxqgwI/s1600/google_notebook.png" /></a>You&#39;ll Discover...
    <ul>
    <li><b><i>The way to customize your PC without any confusing code</i></b></li>
    <li><b><i>How to browse the web in style</i></b></li>
    <li><b><i>The way to make your computer as unique as you are</i></b></li>
    </ul>
    
    <form style="text-align:center;" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=Guidegoods', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><p>Enter your email address:</p><p><input type="text" style="width:140px" name="email"/></p><input type="hidden" value="Guidegoods" name="uri"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="Submit" /></form>
    <div style='text-align: left;'>
    <a href='http://guidegoods.blogspot.com/2010/03/e-book-customize-it-your-way.html'><span style='font-weight: bold;'>
    </span></a><span style='font-size: x-small;'><i><span style='font-weight: bold;'/></span></i></span></div>
    <span style='font-size: x-small;'><i><span style='font-weight: bold;'> We respect your privacy and we will never spam you.</span></i></span>
    <div style='text-align: center;'>
    
    </div>
    </div>
    
    </b:if>
    HTML:
     
    kytro360, Nov 6, 2010 IP
  2. senth

    senth Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Include your content within the following..

    <b:if cond='data:blog.pageType == "item"'>

    </b:if>
     
    senth, Nov 12, 2010 IP
  3. Enursa

    Enursa Well-Known Member

    Messages:
    263
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    100
    Digital Goods:
    1
    #3
    wrong code....

    change to this <b:if cond='data:blog.url == data:blog.homepageUrl'>

    Big letter for "U"
     
    Enursa, Nov 13, 2010 IP