WordPress.org

Support

Support » Themes and Templates » [Resolved] changing date display in the post

[Resolved] changing date display in the post

  • Hi,

    I can’t find where to edit date display on the post header (remove it or change into last modification date). I didn’t find it in single.php and WP Last Modified is not working. Please help 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello!

    I am not sure what you are referring to, but I would like to help. In most situations, the date displayed which is set in the post editor. There you can click on edit, and change the date. I wordpress shows that date.
    Here is a screenshot: http://d.pr/i/mw9F

    But your theme most likely sorts the posts in order of the publication time, so don’t be surprised if the post order has changed.

    If you would like to change the date format how the post publication dates are appearing, you can set it easily inside WordPress Dashboard at Settings->General, here: http://d.pr/i/zOJT

    Greetings,
    Balint

    Theme Author Anthony Hortin

    @ahortin

    There’s a function in functions.php called quark_posted_on() that formats the post meta, including things like the post author and post date.

    Thanks a lot for help. I meant changing default settings of display, but I see it wasn’t clear. I’m experimenting with quark_posted_on() – hope I will figure it out 🙂

    Theme Author Anthony Hortin

    @ahortin

    No probs 🙂

    I changed the default display in the post header ‘posted on’ into last modification date and it is working on my blog, so I can share the solution:

    1) in functions.php file:
    if ( ! function_exists( ‘quark_posted_on’ ) ) {
    function quark_posted_on() {

    change into:
    if ( ! function_exists( ‘quark_modified_on’ ) ) {
    function quark_modified_on() {

    2) in content.php file:
    <?php quark_posted_on(); ?>

    change into:
    <?php quark_modified_on(); ?>

    and:
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() )

    change into:
    esc_attr( get_the_modified_date( ‘c’ ) ),
    esc_html( get_the_modified_date() )

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] changing date display in the post’ is closed to new replies.