Guest User

Untitled

a guest
Oct 20th, 2011
288
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <form action="<? bloginfo('url'); ?>" method="get">
  2. <select name="page_id" id="page_id">
  3. <?php
  4. global $post;
  5. $args = array( 'numberposts' => -1);
  6. $posts = get_posts($args);
  7. foreach( $posts as $post ) : setup_postdata($post); ?>
  8. <option value="<? echo $post->ID; ?>"><?php the_title(); ?></option>
  9. <?php endforeach; ?>
  10. </select>
  11. <input type="submit" name="submit" value="view" />
  12. </form>
  13.  
RAW Paste Data