Show "last update" instead of "date" on user dashboard

Support MB Frontend Submission Show "last update" instead of "date" on user dashboardResolved

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #31011
    Torsten GaugerTorsten 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

    #31015
    Long NguyenLong 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 GaugerTorsten 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 NguyenLong Nguyen
    Moderator

    Let me know if you have any questions.

    #31211
    Ole PoetterOle 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 NguyenLong 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' );
    
    #32365
    AnLipAnLip
    Participant

    Hi Long, could you please explain how to use a custom field (date picker) to show in the date column ?
    Also, do you intend on adding more columns/actions to the frontend dashboard one day ? It would be great for example to be able to reorder the posts with a simple drag and drop... that would make MB dashboard a really cool tool !

    #32395
    Long NguyenLong Nguyen
    Moderator

    Hi AnLip,

    Currently, we do not have intended to add more columns to the frontend dashboard. Just keep it simple and minimalist on the frontend. If you have basic knowledge about code, you can follow this topic to create a new custom dashboard and override its layout.
    https://support.metabox.io/topic/duplicate-dashboard-shortcode/

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.