WordPress.org

Ready to get started?Download WordPress

Forums

Looking for "latest pages" plugin (3 posts)

  1. wujek
    Member
    Posted 2 years ago #

    Hey! I really need wordpress plugin (or just php code) which shows last added pages (NOT POSTS/NEWS!) in my sidebar.

    Do u know any? I was looking for it for ages and didn't find any..

    Thanks and sorry for my english.

  2. wujek
    Member
    Posted 2 years ago #

    please.. It's very important for me

  3. wujek
    Member
    Posted 2 years ago #

    I GOT IT!

    It helped me:

    <?php
       $args=array(
       'showposts'=>5,
       'post_type' => 'page',
       'caller_get_posts'=>1
       );
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
      while ($my_query->have_posts()) : $my_query->the_post(); ?>
        <p><small><?php the_time('m.d.y') ?></small> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
        <?php
      endwhile;
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic