WordPress.org

Ready to get started?Download WordPress

Forums

Recent activity query WordPress (2 posts)

  1. Marije85
    Member
    Posted 2 years ago #

    Hi guys,

    Does anyone know how I can get a list of posts based on their recent activity? Activity such as a new comment, an edit, a new post, et cetera.

    Some Q&A wordpress themes seem to be using this but I have no clue on how to generate such a query myself...

    Please, it's very important.

  2. bcworkz
    Member
    Posted 2 years ago #

    There's probably WP functions that will do what you want. My feeble brain has trouble keeping track of them. I usually resort to a direct SQL query using $wpdb->get_results(). It's fairly straight forward to build a query that returns, say, an array of post IDs where post_modified_gmt time is less than X days ago, etc.

Topic Closed

This topic has been closed to new replies.

About this Topic