WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Only show 1 date and then the posts from that day underneath in own table (4 posts)

  1. ludvig87
    Member
    Posted 8 years ago #

    I have two fansites where I would like to be able to show everything (news and site updates) on the same page, and I would like the setup to be a certain setup.

    Basically it should be like this:

    Date / posted by (own td table)
    Title of post (own td table)
    Content of post (own td table)

    Then it more posts appear on the same day I would like to make it appear like this:

    Date / posted by (own td table)
    Title of post (own td table)
    Content of post (own td table)
    Title of post (own td table)
    Content of post (own td table)

    Anybody who can help me out with some coding that will do this? I run on regular includes (no wp-themes) and wp version 1.5.1.3

    If possible, I would like a solution before 25th dec since the setup should be put with the new layout of 25th dec.

  2. moshu
    Member
    Posted 8 years ago #

    1. Upgrade to 1.5.2 - for your own security.
    2. If you don';t use the theme system, we don't know what you are doing.
    3. Actually the Classic theme is doing that: displays the date on the top only once for many posts on the same day :)

  3. ludvig87
    Member
    Posted 8 years ago #

    1. Have upgraded
    2. Just using regular includes (include("header.php") and include("footer.php"))
    3. I have added the kind of setup from the classic theme, and this is what it ends up as:
    http://www.maria-arredondo.co.uk/test1.php

    The coding for test.php is
    <?php
    /* Don't remove this line. */
    require('wordpress/wp-blog-header.php');
    ?>
    <? include("header1.php") ?>

    <?php wp_head(); ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <table cellSpacing="1" cellPadding="4" width="100%" border="0">
    <tr>
    <td class="content-title"><img src="pic/layout/sub.gif"> <?php the_date('','',''); ?> | posted by <?php the_author() ?></td></tr>
    <tr>
    <td class="content-subject">&nbsp; &nbsp; &nbsp; &nbsp; • <? the_title(); ?></td></tr>
    <tr>
    <td class="content-content"> <?php the_content(); ?>
    </td></tr></table>
    <?php wp_link_pages(); ?>
    <?php comments_template(); // Get wp-comments.php template ?>

    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>

    <?php include("footer.php") ?>

  4. ludvig87
    Member
    Posted 8 years ago #

    This problem is now solved

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.