I would like to get a list of the posts published in WP in every category with the published date and the last modified date.
I've tried to achieve this result through a Plugin but it's completely not mature. So I am also ready to write some code.
I've googled and found this link wp_get_recent_posts
<?php $args = array(
'numberposts' => 10,
'offset' => 0,
'category' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'include' => ,
'exclude' => ,
'meta_key' => ,
'meta_value' =>,
'post_type' => 'post',
'post_status' => 'draft, publish, future, pending, private',
'suppress_filters' => true );
$recent_posts = wp_get_recent_posts( $args, ARRAY_A );
?>
But a big question is where can I put this code and how to get the date? Should I create a micro plugin?
draft
about all categories in a time window of his published date? Or you will get the published and modified date from the post, after you have the post. At first you get a list of post, then have each post this data. You get this via additional function.