• Resolved bellea

    (@bellea)


    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.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter bellea

    (@bellea)

    Submenu doesn’t show up (not always)
    This only happens with the menu “Ledeninfo”
    https://gymnieuwerkerken.coordinaat.com/

    the_time(‘F jS Y’)

    Thread Starter bellea

    (@bellea)

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

    TIA
    Andy

    To change date/time format:

    WordPress Admin Dashboard > Settings > General > Date Format

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

    Thread Starter bellea

    (@bellea)

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

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

    Thread Starter bellea

    (@bellea)

    https://gymnieuwerkerken.coordinaat.com/

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

    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>

    Thread Starter bellea

    (@bellea)

    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(); ?>

    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.

    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!

    Thread Starter bellea

    (@bellea)

    Thanks everyone for the feedback and solution !
    Kind Regards

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Add year to date in post’ is closed to new replies.