Custom Fields
Re-Envisioned
Support MB Frontend Submission Show "last update" instead of "date" on user dashboard

  • Creator
    Topic
  • #31011
    Resolved Torsten Gauger
    Participant

    Hello,

    as our users should update their posts regularly, and we would like to make them aware of this fact, it would be nice to show the date of last update instead of the date of creation in the overview of articles in their frontend dashboard.

    Any idea?

    Regards,
    Torsten

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #31015
    Long Nguyen
    Moderator

    Hi Torsten,

    The date column in the frontend dashboard use the function the_time() to show the created time. You can use this filter hook to show the modified time. For example:

    add_filter( 'the_time', function( $time, $format ) {
        $time = get_the_modified_time( $format );
        return $time;
    }, 10, 2 );
    #31016
    Torsten Gauger
    Participant

    Hi Long,

    thank you very much for the explanation! I highly appreciate the fast and reliable service in this forum. 🙂

    Regards
    Torsten

    #31024
    Long Nguyen
    Moderator

    Let me know if you have any questions.

    #31211
    Ole Poetter
    Participant

    Hi,

    maybe it's a stupid question, but how can I firmat the date in thi filter to M j, Y?

    Kind regards,
    Ole

    #31230
    Long Nguyen
    Moderator

    Hi Ole,

    You can replace your date format with the variable $format in the code above

    $time = get_the_modified_time( 'M j, Y' );
    
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.