Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1257955
    laanavd
    Participant

    Hello,

    Would it be possible to show last modified posts?

    I am working on a timeline site and would like to show visitors what the latest modified posts are, so for example a new post date 14 february 2010.

    So not ‘recent-post’ but ‘last modified post’.

    Best regards,

    Annemarie

    #1258060
    Rupok
    Member

    Hi Annemarie,

    Thanks for writing in! You can just change the publish date to current time after modifying the posts. It would make it latest.

    Cheers!

    #1258070
    laanavd
    Participant

    Hello Rupok,

    Thank you for your answer.

    I use the publication date to indicate when an event has occured, for example a post about marriage or birth. So I would like to show visitors what posts I have added which have taken place in the past.

    Hope you understand what I mean…

    Best regards,

    Annemarie

    #1258149
    Rahul
    Moderator

    Hey There,

    Thanks for writing back!

    You can change the date of a post with the current date. The modified posts will appear in the recent posts section.

    Hope this clarifies it!

    Let us know if you need any further help with this.

    Thank you.

    #1258206
    laanavd
    Participant

    Hi,

    If I change the date of the post with the current date I will get for example:
    2016 nov 15 – Marriage John and Mary
    2016 nov 15 – Birth Andrew
    2016 nov 15 – First schoolday Andrew

    Where this should be (because the timeline is based on the publication date):
    1977 may 23 – First schoolday Andrew
    1973 dec 5 – Birth Andrew
    1970 jul 30 – Marriage John and Mary

    Hope you understand…

    Thanks

    #1258312
    Rupok
    Member

    Hi there,

    Thanks for writing back. In that case it’s not possible to show the last modified post since the publishing date will be count. This is how WordPress works and we can’t change the functionality.

    Hope this makes sense.

    #1258516
    laanavd
    Participant

    Hi there,

    Thank you for your response. The reason I asked is this function I used:

    function wpb_lastupdated_posts() {

    // Query Arguments
    $lastupdated_args = array(
    ‘orderby’ => ‘modified’,
    ‘ignore_sticky_posts’ => ‘1’
    );

    //Loop to display 5 recently updated posts
    $lastupdated_loop = new WP_Query( $lastupdated_args );
    $counter = 1;
    $string .= ‘

    ‘;
    return $string;
    wp_reset_postdata();
    }

    //add a shortcode
    add_shortcode(‘lastupdated-posts’, ‘wpb_lastupdated_posts’);

    <?php
    if (function_exists(wpb_lastupdated_posts)) :
    wpb_lastupdated_posts();
    endif;
    ?>

    I tested this and it seems to work, but without the Theme X layout options. I will look further myselve how to implement this proper in Theme X….but please let me now if you have any creative ideas which could help 😉

    Best regards and thank you for your quick replies!

    Annemarie

    #1258928
    Rupok
    Member

    Hi Annemarie,

    I wish I could help but this is something our of our support scope. Let’s share with us if you manage to do this anyway 🙂

  • <script> jQuery(function($){ $("#no-reply-1257955 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>