0

I'm looking for an overview of all the latest user activities.

But I don't want to see comments on this page, just the edits or creations of new posts or pages.

Unfortunately I can't find such a page on our installation. Could you help me out?

  • You will have to search for a plugin for such functionality. – Borek Jan 19 '14 at 17:39
  • @Borek Thank you for your comment. Do you know of one? – Harold L. Brown Jan 19 '14 at 17:41
  • Yup, but can't give you any specific names cuz' the forum is not a place to post opinions on plugins and/or recomendations for those. That said just type in google: "wordpress user activities plugin" and you will have plenty to choose from. – Borek Jan 19 '14 at 17:45
0

You can use the $WPDB query to query the DB, an example would be:

$editedposts = $wpdb->get_results( 
"
 SELECT ID, post_title 
 FROM $wpdb->posts
 WHERE post_modified = between DateAdd(DD,-7,GETDATE() ) and GETDATE()
"
);

This lists all posts which have been edited in the last 7 days (not tested), you would do something similar to get posts created in that date:

$newposts = $wpdb->get_results( 
"
 SELECT ID, post_title 
 FROM $wpdb->posts
 WHERE post_date = between DateAdd(DD,-7,GETDATE() ) and GETDATE()
"
);

You can then query the data using the variable e.g.

foreach ( $editedposts as $newposts ) {
 echo $newposts->post_title;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.