WordPress.org

Ready to get started?Download WordPress

Forums

Bev Blog Layout (10 posts)

  1. elvenjess
    Member
    Posted 11 years ago #

    How did you guys get your posts in the dev blog to display like this:
    July 15, 2003
    -----------------------------
    Post 1
    Post 2
    July 10, 2003
    -----------------------------
    Post 1
    It sure makes it easier to read. Mind sharing how you did it?

  2. JimBrown
    Member
    Posted 11 years ago #

    Not sure how they did it, but you're welcome to look at the code and CSS behind my template at http://env.ourcrofts.com/weblog.php . I use that same kind of layout.

  3. JimBrown
    Member
    Posted 11 years ago #

    Arrg. Complainer was right, you can't post code. Or at least I don't know how to, although I think I've seen Mike do it. I'll try again.
    <div id="content">
    <?php if ($posts) { foreach ($posts as $post) { start_b2(); ?>
    <?php the_date('','<h2>','</h2>'); ?>
    <h3 class="storytitle">
    " rel="bookmark"><?php the_title(); ?>
    <span class="meta">" title="Category: <?php the_category() ?>">[<?php the_category() ?>] — <?php the_author() ?> @ <?php the_time() ?>
    </span>
    </h3>
    <div class="storycontent">
    <?php the_content(); ?>
    </div>
    <div class="feedback">
    <?php link_pages('
    Pages: ', '
    ', 'number'); ?>
    <?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?>
    </div>
    <?php trackback_rdf(); ?>
    <?php include('b2comments.php'); ?>
    <?php } } // end foreach, end if any posts ?>
    </div><!-- content -->

  4. JimBrown
    Member
    Posted 11 years ago #

    OK, that worked. Learn something new everyday.

  5. elvenjess
    Member
    Posted 11 years ago #

    Sorry for taking so long to reply.
    When I paste that into a file and load it up, it just shows a blank page...

  6. Mike Little
    Member
    Posted 11 years ago #

    Hi elvenjess
    The default template will display your posts as you mention. That is with the date only once regardless of the number of posts for that day, followed by the posts for that day.
    It is also underlined with the default stylesheet.
    Other things you may wish to change like colours, fonts, font sizes etc. can all be changed in the stylesheet.
    What is it you wish to do different from that?
    Mike

  7. Anonymous
    Unregistered
    Posted 9 years ago #

    Hi!
    I'm trying to do the exact opposite. I.e. I want my posts to show up like this:
    ~~~~~~~~~~~~
    30 Oct 2004
    Todays post
    29 Oct 2004
    Yesterday post 1
    29 Oct 2004
    Yesterday post 2
    ~~~~~~~~~~~~
    Where by default multiple posts pasted on the same day only display the date once, like this:
    ~~~~~~~~~~~~
    30 Oct 2004
    Todays post
    29 Oct 2004
    Yesterday post 1
    Yesterday post 2
    ~~~~~~~~~~~~
    Could anyone suggest how to make the date appear on every day?
    Many thanks,
    james

  8. Anonymous
    Unregistered
    Posted 9 years ago #

    >Could anyone suggest how to make the date appear on every day?
    apologies! I meant 'Could anyone suggest how to make the date appear on every entry?'
    thanks

  9. Mark (podz)
    Support Maven
    Posted 9 years ago #

  10. Anonymous
    Unregistered
    Posted 9 years ago #

    Thank you - just what I needed.
    I used the code from that thread (replacing the_date with the_time in my template page), and then set my default time format (under wordpress > options > general) to j M Y so now every entry displays the date in the format '30 Oct 2004'.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.