Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To show the posts changed most recently, sort a WordPress query by modified in descending order. For a custom list, use a secondary WP_Query; add the_modified_date() if you also want an “Updated” date beside each title. Sorting by modification time is different from WordPress’s normal publication-date order.

Decide what “recently updated” should mean

There are two separate display goals:

  • Reorder the list: show the latest modification first, even when the post was originally published months or years ago.
  • Print an update date: show a label such as “Updated September 30, 2026” beside each post.

You can implement either one or both. WordPress stores a modified timestamp, but the query does not determine whether a change was editorially significant. Define your site’s own standard for what counts as a meaningful update.

Best code-based solution: a secondary WP_Query

For a list embedded in a page, template, widget area, or custom block, create a separate query and order it by modified with DESC. WordPress documents modified as the last-modified sort key and descending order as newest first in its WP_Query reference.

<?php
$recently_updated = new WP_Query(
    array(
        'post_type'      => 'post',
        'post_status'    => 'publish',
        'posts_per_page' => 10,
        'orderby'        => 'modified',
        'order'          => 'DESC',
    )
);

if ( $recently_updated->have_posts() ) {
    echo '<ul>';

    while ( $recently_updated->have_posts() ) {
        $recently_updated->the_post();

        echo '<li><a href="' . esc_url( get_permalink() ) . '">';
        echo esc_html( get_the_title() );
        echo '</a> — Updated ';
        the_modified_date();
        echo '</li>';
    }

    echo '</ul>';
}

wp_reset_postdata();
?>

What each argument does

  • post_type => 'post' limits the results to standard blog posts. Substitute a registered custom post type when appropriate.
  • post_status => 'publish' prevents drafts and other non-public statuses from appearing.
  • posts_per_page => 10 limits the component to ten items; change the number to fit the design.
  • orderby => 'modified' uses each post’s stored last-modified timestamp rather than its publication date.
  • order => 'DESC' places the newest modification first.
  • wp_reset_postdata() restores the global post context after the secondary loop, so later template code continues to reference the main post correctly.

The titles and URLs are escaped for output. Adapt the surrounding markup and classes to your theme, then check the rendered list on the target site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Show the update date without changing the order

the_modified_date() prints the current post’s last-modified date and is intended for use inside The Loop. In the example above it appears after each linked title. Use a visible label such as “Updated” or “Last updated” so readers do not mistake it for the original publication date.

If you already have a loop and only need the date, add the function inside that loop. It does not, by itself, reorder posts; ordering must come from the query arguments or the main-query hook.

Block-editor options

Query Loop block

The Query Loop is an advanced block for displaying post types from configurable query parameters and visual settings. Its documented attributes include order and orderBy. Open the block’s settings in the WordPress version running on your site and verify that a modified-date option is actually exposed before relying on it: the reference documents the parameters but does not guarantee that every editor release offers the same control.

  1. Insert a Query Loop block.
  2. Choose the post type and build the title, link, and date layout.
  3. Open the block’s query or sorting settings.
  4. If the installed editor offers modification-date ordering, select descending order and preview the result.
  5. If that control is absent, use the PHP query above or a site-specific block implementation.

Latest Posts block

The Latest Posts block is intended for recent posts and includes order and orderBy attributes. Its documented default is publication-date ordering, and its reference does not establish that modified-date sorting is available in the editor interface. Use it only when the settings in your installed version match your requirement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the right implementation

Need Recommended approach What to verify
A separate list in a page or template Secondary WP_Query Post type, status, item limit, markup, and post-data reset
No-code or low-code list Query Loop block Whether the installed editor exposes modified-date sorting
Standard publication-date list Latest Posts block Its available ordering controls; modified sorting is not established by the reference
Change the site’s main archive order pre_get_posts on the intended main query That the condition excludes admin screens and unrelated queries

Do not use query_posts() for the secondary list

WordPress cautions that query_posts() replaces the main query. That can disrupt pagination, conditional tags, and other template behavior. For an additional list, use a new WP_Query or get_posts() instead. If the actual goal is to change an archive’s primary ordering, investigate the pre_get_posts hook and restrict the change to the specific front-end query that should be affected.

Checks before publishing

  • Confirm that an edited older post moves above newer-but-unchanged posts.
  • Confirm that drafts, scheduled posts, and private posts do not appear.
  • Check that the “Updated” label is distinct from any publication date shown elsewhere.
  • Verify that the list is empty-safe when no published posts match.
  • Check keyboard focus, link targets, date formatting, and the layout on narrow screens.
  • Remember that metadata-only or automated changes can alter the stored modified timestamp; decide whether your editorial workflow treats those as genuine updates.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Official WordPress references

For the exact argument names and behavior, consult the WordPress Developer Resources references for WP_Query, the Query Loop block, the Latest Posts block, query_posts(), the_modified_date(), wp_reset_postdata(), and pre_get_posts. Block controls can vary with the WordPress release installed on your site; the Latest Posts reference was last updated September 21, 2026, while the Query Loop reference is from the 2026 documentation set.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.