Tagged: x
-
AuthorPosts
-
November 15, 2016 at 8:28 am #1257955
laanavdParticipantHello,
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
November 15, 2016 at 9:36 am #1258060
RupokMemberHi 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!
November 15, 2016 at 9:41 am #1258070
laanavdParticipantHello 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
November 15, 2016 at 10:45 am #1258149
RahulModeratorHey 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.
November 15, 2016 at 11:20 am #1258206
laanavdParticipantHi,
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 AndrewWhere 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 MaryHope you understand…
Thanks
November 15, 2016 at 12:28 pm #1258312
RupokMemberHi 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.
November 15, 2016 at 4:16 pm #1258516
laanavdParticipantHi 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 .= ‘- ‘;
- post->ID ) . ‘”> ‘ .get_the_title( $lastupdated_loop->post->ID ) . ‘ ( ‘. get_the_modified_date() .’)
while( $lastupdated_loop->have_posts() && $counter < 5 ) : $lastupdated_loop->the_post();
$string .= ‘‘;
$counter++;
endwhile;
$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
November 15, 2016 at 10:34 pm #1258928
RupokMemberHi 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 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1257955 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
