1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Blogger Template Modification

Discussion in 'Blogging' started by Infiniterb, Mar 4, 2005.

  1. #1
    Is there any way to customize the blogger template to include a bit of code (such as adsense code) within the latest post?
     
    Infiniterb, Mar 4, 2005 IP
  2. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #2
    I use the blogger code within all my own pages. So the answer would be yes.
     
    NewComputer, Mar 4, 2005 IP
  3. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    168
    #3
    Ah, ok. I looked through the blogger help section but couldn't find what I was looking for.

    I basically just want to take an adsense code block and implement it in the top post, but not have it in the posts below.
     
    Infiniterb, Mar 4, 2005 IP
  4. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #4
    Do you mean at the top of your page? Or after comments or where? Have you seen an example, if so post the url on here.
     
    NewComputer, Mar 4, 2005 IP
  5. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    168
    #5
    Haven't seen an example, yet. But basically, what I want to do is place an adsense ad within the latest post on the blog just before the actual post itself. Meaning that ads would be BELOW the latest post title, but ABOVE the post content.

    I know I can put custom content within each post, but for adsense I couldn't do that since we're limited to 3 adsense code blocks. So I need to limit it to just the first post, ideally.
     
    Infiniterb, Mar 4, 2005 IP
  6. honey

    honey Prominent Member

    Messages:
    15,555
    Likes Received:
    712
    Best Answers:
    0
    Trophy Points:
    325
    #6
    Yes, you can change, anything and EVERYTHING.
     
    honey, Mar 4, 2005 IP
  7. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    168
    #7
    Basically, I need a variable that gives the lastpostid so I could write something like:

    <if condition = " <$BlogItemNumber$> > <$LastBlogItemNumber$>">

    Insert adsense code
    </if>

    The <$LastBlogItemNumber$> doesn't exist, however. Anyone got any ideas?
     
    Infiniterb, Mar 4, 2005 IP
  8. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hmmmmm.... that's a tricky one...

    You can make it so that certian elements will be on the main and archive pages, but not the individual posts, but I'm not sure about how to do what you are asking...

    The closest Blogger tags that I can think of for that would be...

    
    <MainPage>This will only appear on the home page</MainPage>
    <ArchivePage>This will only appear on the archive pages</ArchivePage>
    <ItemPage>This will only appear on the individual post pages</ItemPage>
    <MainOrArchivePage>This will appear on both the archive and home pages.</MainOrArchivePage>
    
    Code (markup):
    Hope it helps a little bit, although I'm not sure it's exactly what you were looking for.
     
    SEbasic, Mar 6, 2005 IP