• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WriteNowDesign - Wordpress and Ecommerce Website Design

WordPress, Joomla, Ecommerce Website Design

  • Home
  • Prices/Packages
  • WordPress
  • Services
  • Portfolio
  • Blog
  • About
    • Testimonials
    • Locations
    • Online Payment
  • Contact
  • Show Search
Hide Search

Call 303-907-6133 Email

List Recently Updated Posts

List Recently Modified Posts in WordPress

May 11, 2016 by Pat Fortino

I recently spent several hours figuring out how to list recently modified posts in WordPress. I tried at least 4 plugins, none of which did what I wanted: create a simple unordered list of recently modified posts. But I finally found a free plugin with dozens of display options that does it with ease: Display Posts Shortcode by Bill Erickson. 

The following tutorial explains how to create a list of recently modified posts and display them in a post, page, or widget. Also, with a small tweak, you can display recently modified pages.

Note: For an extensive list of shortcode options and examples, see the Display Posts Shortcode documentation.

To List Recently Modified Posts in a Post or Page

  1. Install the Display Posts Shortcode plugin.
    Instructions for Installing WordPress plugins.
  2. Open a post or page where you want the list to appear.
  3. Insert the following shortcode into the Visual editor and click save.
    [display-posts posts_per_page="10" include_date="true" order="DESC" orderby="modified"]
    If you want to use the default WordPress Text widget, add the following code to your theme’s functions.php file to allow the Text widget to process shortcode:
    add_filter(‘widget_text’, ‘do_shortcode’);

    List Recently Modified Posts Shortcode
  4. Click Save and then view the post or page. You should see an unordered list of 10 recently modified posts with the most recently modified post on top.

To Display a List or Recently Updated Posts in a Widget

It is also possible to display a list of recently updated posts in a widget.

  1. Go to Appearance > Widgets.
  2. Click the Visual Editor widget.
    Note: You will need the Black Studio TinyMCE Widget Visual Editor widget plugin to do this.
    If you want to use the default WordPress Text widget, add the following code to your theme’s functions.php file to allow the Text widget to process shortcode:
    add_filter(‘widget_text’, ‘do_shortcode’);
    Instructions for Installing WordPress plugins.
  3. Select the Widget area you want to use and click Add Widget.Black Studeo Visual Editor Widget
  4. Optional: Add a title to the widget; for example, Recently Updated Stories.
  5. Paste the following shortcode into the Text or Visual Editor and click Save:
    • WPForms Not Sending Notifications (4/16/2020)
    • WooCommerce Terms and Conditions Example (5/22/2017)
    • Add Terms and Conditions WooCommerce (2/9/2020)
    • Fix WordPress AMP Validation Errors (7/12/2019)
    • Add Retina Logo to a Genesis Template (4/22/2014)
    • Hide WordPress Custom Fields on Password Protected Genesis Pages (8/30/2016)
    • Add a Message at Top or Bottom of WooCommerce Checkout Page (12/14/2018)
    • Flexbox Justify-Content Doesn’t Work – Space Between or Space Around (12/2/2018)
    • How to Link to a PDF in WordPress (12/11/2018)
    • Use the Classic Editor with Gutenberg Block Editor (1/13/2019)
  6. Go to a page on your site to view a page. You should see a list of your recently updated posts.
    Note: If you don’t see the list, make sure the widget is configured to display on the page you are viewing.
    Recently Updated Posts List Exammple

To List Recently Modified Pages in WordPress

The procedure for listing recently modified pages in a post, page, or widget is the same as for posts except you need to add post_type=”page” to the shortcode I already used:

  • WPForms Not Sending Notifications (4/16/2020)
  • WooCommerce Terms and Conditions Example (5/22/2017)
  • Add Terms and Conditions WooCommerce (2/9/2020)
  • Fix WordPress AMP Validation Errors (7/12/2019)
  • Add Retina Logo to a Genesis Template (4/22/2014)
  • Hide WordPress Custom Fields on Password Protected Genesis Pages (8/30/2016)
  • Add a Message at Top or Bottom of WooCommerce Checkout Page (12/14/2018)
  • Flexbox Justify-Content Doesn’t Work – Space Between or Space Around (12/2/2018)
  • How to Link to a PDF in WordPress (12/11/2018)
  • Use the Classic Editor with Gutenberg Block Editor (1/13/2019)

Change the Output and Style of the Post List

You can easily change the output and container of the list. The default output of the list is and unordered list, but you can change that to an ordered list or to divs. For example, 

  1. WPForms Not Sending Notifications
  2. Add Terms and Conditions WooCommerce
  3. Fix WordPress AMP Validation Errors
  4. Use the Classic Editor with Gutenberg Block Editor
  5. Add a Message at Top or Bottom of WooCommerce Checkout Page
  6. How to Link to a PDF in WordPress
  7. Flexbox Justify-Content Doesn’t Work – Space Between or Space Around
  8. WooCommerce Shipping Cost by Price or Weight
  9. Recurring Donations with WooCommerce
  10. Align Flexbox Items Vertically Top to Bottom
or 
WPForms Not Sending Notifications
Add Terms and Conditions WooCommerce
Fix WordPress AMP Validation Errors
Use the Classic Editor with Gutenberg Block Editor
Add a Message at Top or Bottom of WooCommerce Checkout Page
How to Link to a PDF in WordPress
Flexbox Justify-Content Doesn’t Work – Space Between or Space Around
WooCommerce Shipping Cost by Price or Weight
Recurring Donations with WooCommerce
Align Flexbox Items Vertically Top to Bottom

Also note that the output, unordered list, ordered list, or div, will use the existing formatting of your template. But you can change the styling to whatever you want using css rules for the class display-posts-listing.

Final Notes

You are not stuck with the shortcode example I have used in this tutorial. There are dozens of examples in the Display Posts Shortcode documentation and the documentation is excellent. Do be afraid to experiment until you get what you want. For example, you can create post lists for custom post types, or show posts from a specific category or tag.

The Display Posts Shortcode is a powerful and flexible plugin, but it requires just a little effort to get exactly what you want. And this plugin is the easiest way to almost endless types of post list without writing any PHP code.

Filed Under: Wordpress How To 2 Comments

Previous Post: « How to Add an Image to WordPress
Next Post: How to Install WordPress Plugins »

Reader Interactions

Comments

  1. Jenny says

    November 28, 2018 at 6:58 am

    Hey, your post is displaying the list that is created by the short code but not the short code itself, which is what I needed. I use the plugin myself and I knew I could do this very thing, but I would just want the text to use. It’s an amazing plugin and I’ve spent many hours tweaking lists. but I guess I’ll have to dig into the documentation again to figure this one out. Sorry, but these examples do me no good if I can’t get the code itself.

    Reply
    • taponitrof says

      November 28, 2018 at 7:03 am

      OK. I fixed it. Thanks.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related

Primary Sidebar

Blog Categories

Call Today

Get a Free Quote

303-907-6133

Subscribe to News

News about WordPress, WooCommerce, & Technology

What’s New

  • WPForms Not Sending Notifications
  • Add Terms and Conditions WooCommerce
  • Fix WordPress AMP Validation Errors
  • Use the Classic Editor with Gutenberg Block Editor
  • Add a Message at Top or Bottom of WooCommerce Checkout Page
  • How to Link to a PDF in WordPress

Find Us On…

  • Facebook
  • LinkedIn
  • RSS

Call 303-907-6133 Email

© 2004–2023 · WriteNowDesign · Sitemap · Log in · Return to Top

 

Loading Comments...