Support » Plugins and Hacks » [Plugin: Lex's Last Update Widget] Posts/Pages last modified time

[Plugin: Lex's Last Update Widget] Posts/Pages last modified time

Viewing 9 replies - 1 through 9 (of 9 total)
  • (for info only)
    Hello again Lex,
    My previous post was incomplete, sorry. Here is my final modified code block:

    $allposts = new WP_Query();
    	array(  'post_type' => array( 'post', 'page' ),
    		'orderby'   => 'modified',
    		'order'     => 'DESC')
    if( $allposts->have_posts()) {
    	$format = $instance['dateformat'];	//echo "foramt " . $format;
    	if( empty( $format ))
    		$format = "l, F j, Y";
    	echo "<li>";
    	the_modified_date( $format );
    	echo "</li>";

    1. includes pages as well as post
    2. sorts on modified date
    3. returns modified date

    Hope it may be of use to someone.

    oh, and happy new year.


    Plugin Author Lex–


    Hello Claude,

    Thank you for your contribution and your feedback.
    And happy new year too. ๐Ÿ™‚

    If you agree, I would like to include your modification in the next version of the plugin. I may also let the choice in the administration panel (look at posts, pages, look for creation or modifications).

    Best regards,


    But of course Lex! That is why posted my mofidification… itยดs a matter of sending back good inspirational energy… ๐Ÿ™‚
    Take care.

    Hello Lex and ClaudeN

    I use your plugin with the extension of ClaudeN

    Fist of all, a great plugin, i searched for something like that, (and I’m still searching as it doesn’t work well) Nevertheless, Thanks for your work!!!!

    There is a problem, it appeared from the beginning:

    The result of the query, shown in the dateline is not that, what it has to be. Always not the date of the last change is shown.

    For example, on one blog I modified a post and a site today (jan, 9), but the widget shows me last change: december, 22…..

    I’m not very firm in php so I’m not able find out what’s wrong

    Maybe it’s a problem, that you use have_posts etc. or it’s the query with the array that doesn’t work.



    Plugin Author Lex–


    Hi RedFlash3000,

    I have not yet integrated Claude’s contribution.
    Could you try to add ‘revision’ in the array of the query?

    'post_type' => array( 'post', 'page', 'revision' )

    I will take some time this evening to work on the next version.
    Hopefully, this version should fix your problem.

    And link updates are not handled for the moment, neither in my code, nor in Claude’s one. I might take a look at this too.

    Hi Lex

    I was off for a couple of hours but I worked this evening several hour on the script an didn’t solve the problem.

    Your idea doesn’t work. I modified and left only page and revision and then the result was nearly ok. But now the posts weren’t no longer checked.

    I also tried severeal orderby-strings like post_modified or post_date, as these are the names of the fields in the sql-table.

    I also tried an sql-query but it doesn’t work at all.

    I also tried other functions but so far, no success.

    I don’t know how the wp_posts table is chosen by the query, or does the function “query” check all tables in the wp database?

    Does the plugin works well in your blog, that means does it show the right date and time, when an update in any post or page happens?

    I’ll continue!

    More to come tomorrow afternoon.


    Plugin Author Lex–


    Hi RedFlash,

    I have just released the version 1.1.0.
    It has new options and it should be better for your needs. I did not see problems on my testing installation but I may have missed something.

    You will need to select all the 4 elements to watch (posts, pages, revisions and bookmarks). And select the “modified” criteria. For non-modified elements, the creation time will be taken.

    Also, notice that only bookmarks modified after the plugin installation will be taken into account. That’s because WordPress does not store creation and edition time for bookmarks.

    Great job Lex. Beau boulot Lex!

    Hello together!

    That’s it. I found out, why the plugin doesn’t work on my blogs.

    On every Blog I have a post, wich is sticky (always on top of the list)
    to post important things on the mainpage.

    That explains why the plugin worked, as no posts where included in the array, but only pages and revisions.

    I deactivated the sticky-mode and your plugin works perfect!!!!
    I must say: Very Perfect, espacially with the new version!

    Now it still remains a problem: Why is there always an overrun of result of the query, so that the last date/time of the sticky post is only displayed?
    I looked at the wp_posts table and while I order by “post_modified”, always the last change is on the top of the queryresult.

    I’ll keep on searching.

    Thank you for your great work so far.

    I’m still wondering, why no one else!!!!! need such a plugin and such an information of the last blogchange on their blogs etc.???

    So Far


Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Lex's Last Update Widget] Posts/Pages last modified time’ is closed to new replies.