WordPress Plugin: Recent Changes

As WordPress comes of age as a powerful CMS and Bliki the ability to see recently changed items has become an important feature.

This plugin adds a widget to your sidebar that allows you to:

  • set a title for your list of recent items in the side bar
  • choose recently changed posts, pages or both
  • select 1-15 most recently modified items in your sidebar
  • exclude multiple pages or posts by ID

I have added a shortcode to the plugin so you can add a list of recent changes to any page or post.

[recentchanges] will add a list of the 5 most recently changed pages and posts. You can set the following parameters to modify the results:

content = ‘pages’, ‘posts’ or ‘both
number = ’1′ to ’15′
exclude = any number of pages/post by ID separated by commas

e.g. [recentchanges content='pages' number='10' exclude='5,8'] would generate:

NB all functionality of my WordPress Widget: Recent Pages has been incorporated into this new widget.

Download Recent Changes and please leave a comment if you have feature requests and/or issues.

If you find this plug in useful please consider donating to its future development:

  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • StumbleUpon

17 Comments

  1. baron says:

    Works great, thank you

  2. Alex says:

    Works great thanks – but just needs a small adjustment to be valid XHTML

    line 43
    echo ‘‘.$RecentChange->post_title.’‘;

    The href= needs double quotes to start and end around the $rc_url

    Otherwise the W3C validator throws up about 40 errors

  3. Toni Prug says:

    Hi Titus, great plugin, exactly what i was looking for. I added couple of features to it, you can see screnshoots at:

    http://hackthestate.org/wp-dev/plugin-recent-changes/

    i’d like to send you the source code with new features, but i can’t find your email on this blog nor in readme.txt file.

  4. Ken harper says:

    Hello there,

    First, thx a ton for the work.

    I’m a bit new to theme development and have my first theme all working but can’t seem to get any line breaks after each in your widget. I know it it must be something simple I’m missing, can you point me in a good direction?

    Thx for you time.

    k

  5. Abikesha says:

    Hi all,
    Can you help me, how to exclude view some pages that i would change.

    If in Recenpost i can write this :
    Recent_Posts(exclude=249) ===> it can work

    How i must write for Recent Changes plugin because i write :
    widget_RecentChanges(array ()&exclude=2) ===> doesn’t work.

    please help me!

  6. Arnout says:

    Works fine, but had to change the database query. You should replace wp_posts with “.$wpdb->posts.” and add the ‘global $wpdb;’ statement above it. This fixes the cases where wordpress installations use a prefix for their databases.

  7. Mat says:

    Thanks for the plugin, I like it but had to make the change from Arnout in order for it to work for me.

  8. titusbicknell says:

    Sorry for the delay in addressing your comments. I have issued a 0.2 release today that includes:
    - Alex’s W3C validation fix
    - Arnout’s $wpdb->posts fix

    Ken: can you sned me a link to your install showing the plug in without line breaks?
    Abikesha: I do not have an easy solution for you as my plug in is not based on the Recent Pages core code.

  9. ultor says:

    I am getting incorrect rc_url for posts but fine for pages.

    I had to change get_page_link to get_permalink to work for me.

  10. Greeny says:

    I wont to know why text widget code, give errors on validation w3c.How can we fix that.Thank you

  11. titusbicknell says:

    Can you send me the link for a page with the Recent Changes plug in active so I can see what errors W3C identifies?

  12. titusbicknell says:

    new version includes ability to exclude by ID and a shortcode for use in pages and posts.

  13. I think it would be a good idea to optionally show the date along the post and pages.

  14. Kelvin Jones says:

    I upgraded your plugin and it does not work. What apppeared on the website was not intelligablle so I deactivated it. I had been using the recent pages choice but an old version of your plug-in and that had been working and I liked it.

  15. Josh S says:

    Hi,
    Im trying to add this widget to my home page so it will show the 3 most recent pages from my articles directory. I found the code to load wp functions:
    define(‘WP_USE_THEMES’, false);
    require(‘./articles/wp-load.php’);

    but what php would I need in my sidebar to make the widget appear on my home page. If you can help me it would be greatly appreciated.

    Thanks,
    Josh

  16. titusbicknell says:

    Josh: under appearance -> widgets you can activate and configure Recent Changes so that it appears in your widgetised sidebar.

Leave a Reply