Results 1 to 6 of 6

Thread: How would I change the post date?

  1. #1
    Thread Starter
    Newbie
    Not a Verified Customer
    daniel's Avatar
    Join Date
    Dec 2009
    Location
    Romania
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How would I change the post date?

    I have looked all around the forum, prior to asking. I haven't found any posts that cover my question. So here goes...

    I would very much like to change the 'Posted an hour ago' (or 20 mins ago, etc) to 'Posted Today'. Any quick way, strike that, any way of accomplishing this? Any and all help would be very appreciated. Thanks.

  2. #2
    Veteran sarge's Avatar
    Join Date
    Jun 2009
    Location
    USA
    Posts
    628
    Thanks
    2
    Thanked 9 Times in 9 Posts

    Re: How would I change the post date?

    I personally do not know of a way, you can play around with the dates in the settings and see if that accomplishes anything.
    Always treat everyone with respect and courtesy, but trust no one.

  3. #3
    Thread Starter
    Newbie
    Not a Verified Customer
    daniel's Avatar
    Join Date
    Dec 2009
    Location
    Romania
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How would I change the post date?

    Thank you for your reply. I believe I have researched all possibilities, within the available settings. This would be more of change to the core, I believe. Changes I am willing to make, as my setup is already heavily, heavily modded. I just can't seem to figure this particular solution out...

  4. #4
    Junior Member
    Not a Verified Customer
    Leaf.'s Avatar
    Join Date
    Apr 2010
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How would I change the post date?

    These might help .....

    1) WordPress Timeago Plugin - http://wpsplash.com/wordpress-timeago-f ... es-plugin/" onclick="window.open(this.href);return false;

    2) Hardcode, but built-in-WordPress, Option. Very cool - http://www.upthemes.com/2010/03/wordpre ... r-comments" onclick="window.open(this.href);return false;

  5. #5
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How would I change the post date?

    I believe you'd change the function, ie:

    index.php
    Code:
    <?php echo classi_time($post->post_date); ?>
    functions.php
    Code:
    function classi_time($m_time) {
    	$t_time = get_the_time(__('Y/m/d g:i:s A'));
    Y/m/d g:i:s A
    http://www.php.net/manual/en/function.date.php"

    look under parameters.

    Y A full numeric representation of a year, 4 digits Examples: 1999 or 2003
    y A two digit representation of a year Examples: 99 or 03
    m Numeric representation of a month, with leading zeros 01 through 12
    M A short textual representation of a month, three letters Jan through Dec
    Time --- ---
    a Lowercase Ante meridiem and Post meridiem am or pm
    A Uppercase Ante meridiem and Post meridiem AM or PM

    etc

  6. #6
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How would I change the post date?

    More here
    http://codex.wordpress.org/Template_Tags/the_time

    so in theory in single.php I can replace the listing time (post date)
    Code:
    <?php the_time(get_option('date_format') . ' ' . get_option('time_format')) ?>
    with


    Posted: <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?></p>

    and have
    Posted: July 17, 2007 at 7:19 am

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)