WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How do I call a date? (3 posts)

  1. SoFlaChris
    Member
    Posted 8 years ago #

    Hi,

    I am trying to call the date for my posts, as seen @ http://ifelse.co.uk/archives/2005/02/20/new-release-of-time-of-day-plugin/#comment-1769

    This is my index code:

    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    <div id="content">
    <?php
    if ($posts) {
    foreach($posts as $post) { start_wp();
    ?>

    <div class="post">
    " style="text-decoration:none;" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?>
    <div class="cite"><?php the_time("l F dS Y") ?>, <?php the_time() ?> <?php edit_post_link(); ?>
    <?php _e("Filed under:"); ?> <?php the_category(',') ?></div>
    <?php the_content(); ?>
    <div class="commentPos"><?php wp_link_pages(); ?><?php comments_popup_link(__('0 Comments'), __('1 Comment'), __('% Comments')); ?></div>

    <div class="sep"></div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php comments_template(); // Get wp-comments.php template ?>
    </div>
    <?php } // closes printing entries with excluded cats ?>
    <?php } else { ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php } ?>
    <div class="right"><?php posts_nav_link('','','previous »') ?></div>
    <div class="left"><?php posts_nav_link('','« newer ','') ?></div>
    </div>
    <?php get_footer(); ?>

    How do I get the date to post in front of the "friendly" time?

    TIA,
    Chris

  2. tomhanna
    Member
    Posted 8 years ago #

    On the phone?

    http://codex.wordpress.org/Template_Tags/the_date

    <div class="cite"><?php the_date(); ?><?php the_time("l F dS Y") ?>, <?php the_time() ?>

  3. SoFlaChris
    Member
    Posted 8 years ago #

    Hohoho... You funny guy.

    It was that simple: <?php the_date(); ?>

    http://blog.maltese.net

    Thanks again!

    Chris

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags