Viewing 4 replies - 1 through 4 (of 4 total)
  • Here’s the function my theme chooses: `<?php
    query_posts(‘cat=1,3,4,19,12,18,11,17,5,14,20,13,15,16,2&showposts=3’);
    ?>`

    The cat means all the id’s that correspond to all my categories and the showposts stand for how many recent posts I want to show.

    Thread Starter jhovenell

    (@jhovenell)

    it didn’t work for me…. ??

    any other idea???

    What I want to display is the title of 5 recent PAGE created and not recent POST….

    Thanx.

    Thread Starter jhovenell

    (@jhovenell)

    is there any plugin for this?

    I couldn’t see any plugins that let you limit the number of pages to the latest 5 so try this.

    <?php
    $all_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'page' ORDER BY post_date DESC LIMIT 5");
    $page_ids = implode(",", $all_ids);
    $wlp_param_list='depth=0&include=' . $page_ids;
    wp_list_pages($wlp_param_list);
    ?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to display 5 most recently created Page title in the sidebar?’ is closed to new replies.