Forums

[resolved] Add year to date in post (13 posts)

  1. bellea
    Member
    Posted 1 year ago #

    I would like to add the year in the date at the post header.
    Now it's JUN 10TH and i would like to see JUN 10TH - 2010 for example.

  2. bellea
    Member
    Posted 1 year ago #

    Submenu doesn't show up (not always)
    This only happens with the menu "Ledeninfo"
    http://gymnieuwerkerken.coordinaat.com/

  3. MAS
    Member
    Posted 1 year ago #

    the_time('F jS Y')

  4. bellea
    Member
    Posted 1 year ago #

    Oeps... where do i have to change this ?
    single.php ? Insite WordPress ?
    Can't find it.

    TIA
    Andy

  5. nick.arpanet
    Member
    Posted 1 year ago #

    To change date/time format:

    WordPress Admin Dashboard > Settings > General > Date Format

    (If that resolves your question, mark this post as resolved)

  6. bellea
    Member
    Posted 1 year ago #

    Nope...that doesn't work.
    It still shows JUN 10 without the year. ;-(

  7. MAS
    Member
    Posted 1 year ago #

    which page you want to show it? can you give that page?

  8. bellea
    Member
    Posted 1 year ago #

    http://gymnieuwerkerken.coordinaat.com/

    There you will see... "JUN 10TH Posted...."
    What i would like to do... "JUN 10TH 2010 Posted..."

  9. MAS
    Member
    Posted 1 year ago #

    edit your index.php file and replace

    <div class="post-date">
    <p class="day"><?php the_time('M jS') ?></p>
    </div>

    with

    <div class="post-date">
    <p class="day"><?php the_time('M jS Y') ?></p>
    </div>
  10. bellea
    Member
    Posted 1 year ago #

    This is the index.php file of the theme...
    There's no ...the_time.... ?
    Are is there another index.php file somewhere ?

    <?php
    /* Mystique/digitalnature */
    get_header();
    ?>

    <!-- main content: primary + sidebar(s) -->
    <div id="main">
    <div id="main-inside" class="clear-block">

    <!-- primary content -->
    <div id="primary-content">
    <div class="blocks">
    <?php do_action('mystique_before_primary'); ?>
    <?php
    if (have_posts()):
    while (have_posts()):
    the_post();
    mystique_post();
    endwhile;

    mystique_pagenavi();
    else: ?>
    <h1 class="title error"><?php _e("No posts found","mystique"); ?></h1>
    <p><?php _e("Sorry, but you are looking for something that isn't here.","mystique"); ?></p>

    <?php endif; ?>
    <?php do_action('mystique_after_primary'); ?>
    </div>
    </div>
    <!-- /primary content -->

    <?php get_sidebar(); ?>

    </div>
    </div>
    <!-- /main content -->

    <?php get_footer(); ?>

  11. MAS
    Member
    Posted 1 year ago #

    goto this function mystique_post(); and check once. Till now I am not work on Mystique Theme. So, I don't know the appropriate file name.

  12. jschaffner
    Member
    Posted 1 year ago #

    The aforementioned file is located at wp-content/themes/mystique/lib/core.php. Once you open this file, do as chinmoy suggests and change the line of code

    <p class="day"><?php the_time('M jS') ?></p>

    to

    <p class="day"><?php the_time('M jS Y') ?></p>

    It worked for me in a snap!

  13. bellea
    Member
    Posted 1 year ago #

    Thanks everyone for the feedback and solution !
    Kind Regards

Topic Closed

This topic has been closed to new replies.

About this Topic