• Now that we can add pages to our blogs, I would like a plugin that will pull up “Recent Pages” …. similar to “Recent Posts”.

    Can someone make me one please?

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • If you use MtDewVirus’s Recent Posts plugin, all you need to do is change the post_status from ‘publish’ to ‘static’.

    http://dev.wp-plugins.org/browser/recent-posts/branches/wp-1.5/

    Thread Starter Jabbok

    (@jabbok)

    Yes, but that would interfere with my recent “Posts”. I need a seperate plug-in so I can display both recent posts and recent pages.

    You should be able to change one line in the plugin to get both–from this:

    $request = "SELECT ID, post_title, post_excerpt FROM $wpdb->posts WHERE post_status = 'publish' ";

    to this:

    $request = "SELECT ID, post_title, post_excerpt FROM $wpdb->posts WHERE (post_status = 'publish' OR post_status = 'static') ";

    To have one for each, copy the plugin and give different names to the filename (recent-pages.php), the plugin name (Recent Pages), and the function (mdv_recent_pages). Then just make the change oriecat suggests in your *new* plugin.

    Well I think he wants both, but separate. Just change the references of posts to pages and rename the file:

    Copy and rename to recentpages.php
    Change the plugin name to Recent Pages
    Change the description to pages
    Change the function to mdv_recent_pages
    Change the post_status to ‘static’
    Put in template as <?php mdv_recent_pages(); ?>

    Oh you edited on me 🙂

    ;)

    Thread Starter Jabbok

    (@jabbok)

    That worked.
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Recent Pages’ is closed to new replies.