WordPress.org

Forums

today's date (7 posts)

  1. paleomedia
    Member
    Posted 7 years ago #

    Easy question I think: how do I call today's date to run in my header?

    thanks,

    nate

  2. paleomedia
    Member
    Posted 7 years ago #

    I figured it out, if anyone is interested :-)

  3. KKWangen
    Member
    Posted 7 years ago #

    I'm interested, I was just looking for a solution for this myself and found this thread.

  4. whooami
    Member
    Posted 7 years ago #

    uhh.

    echo date("F j, Y, g:i a");

    http://www.php.net/date

  5. Midlife-editor
    Member
    Posted 7 years ago #

    Speaking of dates, I am trying to remove the date on my pages, or better than that, have the page date reflect the modifications to the page.

    I have no problem with the date on posts. That's fine. But when I modify a page, I want the date to reflect the modification.
    Instead, I'm stuck with the original date the page was created. For example...
    http://midlifejourney.com/index.php/keeping-fit/
    the date showing at the top of this page is November 19, 2007, the date the page was created. It has been modified many times since, but the date will not change.
    I have tried two plugs ins - "Last Modified" and "Page Date", but neither works... The theme I'm using is: SeaShore 1.0 which I like, but removing or changing the date on the pages just doesn't seem to work. Perhaps the theme doesn't allow it. Any help would be appreciated.

  6. moshu
    Member
    Posted 7 years ago #

  7. Midlife-editor
    Member
    Posted 7 years ago #

    I am at a loss as to where to put the code on the page.php page... tried it before div tags, after div tags... whatever... need some help...

    My question... where do i put the the modified date tag??? Thanks for any assistance.

    Below is the code i have to work with:

    <?php get_header();?>
    <div id="main">
    <div id="content">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">

    <p class="date">
    <span class="month">
    <?php the_time('M') ?>
    </span>
    <span class="day">
    <?php the_time('d') ?>
    </span>
    <span class="year">
    <?php the_time('Y') ?>
    </span>
    </p>
    <h2 class="title">" rel="bookmark"><?php the_title(); ?></h2>
    <div class="meta">
    <p>Published by <?php the_author_posts_link() ?> <?php edit_post_link(); ?></p>

    </div>
    <div class="entry">
    <?php the_content(__('Continue Reading »')); ?>
    <?php wp_link_pages(); ?>
    <?php $sub_pages = wp_list_pages( 'sort_column=menu_order&depth=1&title_li=&echo=0&child_of=' . $id );?>
    <?php if ($sub_pages <> "" ){?>
    <p class="meta">This page has the following sub pages.</p>

      <?php echo $sub_pages; ?>

    <?php }?>
    </div>
    <p class="comments">
    <?php comments_popup_link(__('No responses yet'), __('One response so far'), __('% responses so far')); ?>
    </p>
    <?php comments_template(); // Get wp-comments.php template ?>
    </div>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    <p align="center"><?php posts_nav_link(' - ','« Prev','Next »') ?></p>
    </div>
    <?php get_sidebar();?>
    <?php get_footer();?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags