Viewing 4 replies - 1 through 4 (of 4 total)
  • First, find the template used to display the posts. It is probably index.php. Then, find the string used to display the date. It is probably either <?php the_date('') ?> or <?php the_time('F jS, Y') ?>.

    Replace that with:

    <?php if (is_sticky()) {echo date_i18n('F jS, Y');} else {the_time('F jS, Y');} ?>

    Thread Starter kaspr007

    (@kaspr007)

    My index.php file didn’t refrence the time or date. I did find this in my child theme’s functions.php:

    $postdate = '<div class="entry-date">';
        $postdate .= '<abbr class="published" title="';
        $postdate .= get_the_time(thematic_time_title()) . '">';
        $postdate .= get_the_time(thematic_time_display());
        $postdate .= '</abbr></div>';

    Could I alter that to have the date show as current? If so what would I change it to?

    This is just a guess because I can’t test it:

    $postdate = '<div class="entry-date">';
        $postdate .= '<abbr class="published" title="';
        $postdate .= get_the_time(thematic_time_title()) . '">';
        $postdate .= (is_sticky()) ? date_i18n('F jS, Y') : get_the_time(thematic_time_display());
        $postdate .= '</abbr></div>';
    Thread Starter kaspr007

    (@kaspr007)

    Thanks vtxyzzy, That was exactly what I was looking for, Cheers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use the current date for a sticky post?’ is closed to new replies.