Date header for multiple posts

Now i can dispaly my posts irrespective of wheter i have posted them on the same day or not.Normally, if you are performing multitple posts on the same day , then the date header will appear only once.I made a slight modification and VOILA,, even multiple posts show individual headers.

  1. Take a back up of your template before even you attempt
  2. Locate the following lines of code
    <div class=’blog-posts’>
    <b:loop values=’data:posts’ var=’post’>
    <b:if cond=’data:post.dateHeader’>
    <h2 class=’date-header’>
    <data:post.dateHeader/>
    </h2> </b:if>

    <b:include data=’post’ name=’post’/>
  3. Delete the lines in red
  4. Insert the lines in green
    <div class=’blog-posts’>
    <b:loop values=’data:posts’ var=’post’>
    <div class=’date-header’>
    <data:post.timestamp/>
    </div>

    <b:include data=’post’ name=’post’/>
    <b:if cond=’data:blog.pageType == “item”‘>

Save and view

16 Replies to “Date header for multiple posts”

  1. hi,

    Just tried this… and it doesn’t work.

    I realize that all the &lt are supposed to be < characters. But it didn't change the 'no date on multiple posts' behavior. strange… Thanks anyway. Some interesting ideas here at this blog. Thanks.

  2. hmmm… in previous comment the first ‘< ' character should have read '& lt' (without spaces). sorry for any confusion. ciao

  3. hmm..Actually
    &ltb:if cond=’data:post.dateHeader’> this is what is responsible to check the number of posts on a same day.
    So i just removed that condition and reaplced “”data:post.dateHeader”” with the “”data:post.timestamp””.
    This depends on how you have set up your time stamp in the settings.
    Glad you liked this space
    Thank you
    Deepa

  4. Hi,
    I tried changing the old codes to the following:

    b:loop values=’data:posts’ var=’post’

    div
    h2 class=’date-header’
    data:post.dateHeader/
    /h2
    /div

    (i can’t post with orig codes)

    It fails to work. May I know where I had gone wrong?

    My date format: Day, MonthDate, YYYY

    Appreciate your help.

    Thank you.

  5. Welcoem Kat..
    I have used the timestamp variable of the blogger
    So it would display what ever date format you have given in the settings.
    Please make the changes (by reading) line-by-line.. to be more specific. & please give u r blog url so that i can check back.Thanks for visting

  6. I am trying to move the date stamp so it reads like this:

    Posted by Daisy on June 6, 2007 at 9:04 AM

    With timestamp and datestamp formatting matched and instead of having the date at the top of the post. Also would like this to work if I post multiple times per day. Can you help, please??

    I did have some luck using your help to get the time to appear at the top of each post, but that’s not quite what I was looking for.

    My (current) code is:
    !– posts —
    div class=’blog-posts’

    b:include data=’top’ name=’status-message’/

    data:adStart/

    b:loop values=’data:posts’ var=’post’

    b:if cond=’data:post.dateHeader’

    h2 class=’date-header’

    data:post.dateHeader/

    /h2

    /b:if

    b:include data=’post’ name=’post’/

    b:if cond=’data:blog.pageType == “item”‘

    b:include data=’post’ name=’comments’/

    /b:if

    /b:loop

    data:adEnd/

    /div

  7. Welcome Daisy
    ///Also would like this to work if I post multiple times per day///////
    yes.. the purpose of this is for multiple posts on the same day
    ///////////instead of having the date at the top of the post////
    by this i guess ..you donot want the date-time appearing at the top of the post…
    then locate and remove the below code
    <b:if cond=’data:post.dateHeader’>
    <h2 class=’date-header’>
    <data:post.dateHeader/>
    </h2>
    </b:if>

    ///////I am trying to move the date stamp so it reads like this:
    Posted by Daisy on June 6, 2007 at 9:04 AM/////
    Here:
    june 6 2007 is the dateheader format
    9.04 is the timestamp

    This can be acived only when you have the date hader and tiemstamp formatted differently (appropriately)
    and do this Locate and make changes accordingly
    <b:if cond=’data:top.showAuthor’>
    <data:top.authorLabel/>
    <data:post.author/>
    ON
    <data:post.timestamp/>
    </b:if>

    here <data:top.authorLabel/> determines the text “POSTED BY”.. If you wish.. you may delet this and inset any text that you like to appear on the blog

    hope this helps
    Deepa

  8. I was very happy to find this. However, I can't locate the code you suggest, possibly because the code now doesn't look like it did back when you wrote this post. I would really like to have multiple posts on the same day dated individually, but have no experience editing this code, so any suggestions would be gratefully received.

  9. Hi Blam, Welcome here.
    Try looking for something that resembles..

    b:loop values='data:posts' var='post'

    IF you are still unable to find it, we can dissect the template togather

  10. I can't find what you're asking for — or intuit an equivalent.

    The HTML template looks pretty transparent (given that I don't know much about this), and it has all these section headers called Header, Outer Wrapper, Comments, etc., but I don't see any "meat" that pertains to dates, which is odd and frustrating.

  11. I just wrote a longer reply but it never showed up. Grr! The short version is that I can't find what you're suggesting, even though from what the template looks like it should jump out at me. Shall I E-mail it to you?

  12. My posts keep getting eaten. I'll E-mail you the template if I can find a link or address here, else I'll try posting again later.

  13. @Blam, Your comments were not getting lost or deleted.

    As comment moderation is enabled, all comments arrive at my inbox before i personaly authorise them to be published.

    So no worry,

    You can use this link to contact me.

    Hope this helps
    Regards
    Deepa

Leave a Reply

Your email address will not be published. Required fields are marked *