WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] how to show last updated pages

[Resolved] how to show last updated pages

  • Dear friends,
    I would like to display last updated pages in my sidebar.
    I am totally newbie in the php world, but I found a tuned a code from a forum:

    <?php
       $args=array(
       'showposts'=>10,
       'post_type' => 'page',
       'caller_get_posts'=>1,
       'cat' => 206, 191, 184, 185, 186, 187, 188, 189, 190
       );
    $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('d.m.y') ?></small> <a href="<?php the_permalink() ?>" rel="bookmark" title="Odkaz na <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
        <?php
      endwhile;
    }
    ?>

    The code works pretty well, just it shows new added pages exclusively, not all updated pages:-(

    What is needed to be changed there to show all last updated pages?

    Thanks a lot,
    Martin

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] how to show last updated pages’ is closed to new replies.
Skip to toolbar