• Hey everyone.

    I am guessing the answer is no, since I can’t find anything on this, but perhaps there is a plugin or something that will work…

    Is it possible to list recently created/updated Pages?

    Any suggestions would be much appreciated!

    Thanks!

    joi.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can you define “recently?” ;)

    At present you would have to build a custom query and loop for this:

    <?php
    $limit = 5; // how many recently modified Pages to display
    $pages = $wpdb->get_results("SELECT * from $wpdb->posts WHERE post_type='page' and post_status='publish' ORDER BY post_modified DESC LIMIT $limit");
    foreach($pages as $post) : setup_postdata($post);
    ?>
    <h2><?php the_title(); ?></h2>
    <?php the_modified_date(); ?>
    
    <?php the_content(); ?>
    <?php endforeach; ?>
    Thread Starter atomique

    (@atomique)

    This definitely works, thank you!

    Kafkaesqui,

    This is exactly what I have been hunting for, but can you take it one step further and have only retrieve recently updated/modified children and grandchildren pages of a certain parent page?

    Thank you for any help!

    EDIT: Nevermind, I figured it out!

    Is there any way to check each page’s previously modified date with the most recent modified date and only show those pages?

    Rich

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Possible to list recently created/updated Pages?’ is closed to new replies.