• Hi there… I was wondering if anyone can help me out with my site. I am not too good when it comes to coding and what not, most of the stuff I learned on my own so some of it doesn’t quite make sense to me.

    Anyway, here’s my dilema: I am using a new theme on my site http://www.voodooenvy.com, and I’ve spent a lot of time trying to modify it. Right now, the problem I have is with the date and time showing on posts and pages… can anyone help me with this?

    Here’s my page php:


    <?php get_header(); ?>

    <div id="content" class="widecolumn">

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <div class="entrytext">
    <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
    <?php link_pages('<p>Pages: ', '</p>', 'number'); ?>
    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Can anyone help me out with this? I would greatly appreciate it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Look inside the default theme:

    for posts (right out of index.php):

    <small><?php the_time('F jS, Y') ?> by <?php the_author() ?></small>

    for comments (this is taken right from comments.php):

    <?php comment_date('F jS, Y') ?> at <?php comment_time() ?>

    Thread Starter voodoobanshee

    (@voodoobanshee)

    Thanks so much for that info! However, where in the index theme do I put the code in? Does it matter where it goes? Anyway, I’ll play with it.

    Here’s the main index code:


    <?php get_header(); ?>

    <div id="content" class="narrowcolumn">

    <?php if (have_posts()) : ?>

    <?php genki_announcement() ?>

    <!-- First Post -->
    <?php $top_query = new WP_Query('showposts=1'); ?>
    <?php while($top_query->have_posts()) : $top_query->the_post(); $first_post = $post->ID; ?>

    <div class="post top" id="post-<?php the_ID(); ?>">
    <h2 class="first">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2>
    <span class="postmetadata">• <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> <?php edit_post_link('Edit', '(', ')'); ?></span>

    <div class="entry">
    <?php the_content("<span class=\"continue\">" . __('Continue reading','') . " '" . the_title('', '', false) . "'</span>"); ?>
    </div>
    </div>

    <?php endwhile; ?>

    <!-- Next few posts -->
    <?php while(have_posts()) : the_post(); if(!($first_post == $post->ID)) : ?>

    <div class="post lastfive" id="post-<?php the_ID(); ?>">
    <h2>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2>
    <span class="postmetadata">• <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> <?php edit_post_link('Edit', '(', ')'); ?></span>

    <div class="entry">
    <?php the_excerpt(); ?>
    </div>
    </div>

    <?php endif; endwhile; ?>

    <?php else : ?>

    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    <?php akismet_counter(); ?>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Thanks again!

    Jessie

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding Date & Time to posts & Comments’ is closed to new replies.