Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="<? bloginfo('url'); ?>" method="get">
- <select name="page_id" id="page_id">
- <?php
- global $post;
- $args = array( 'numberposts' => -1);
- $posts = get_posts($args);
- foreach( $posts as $post ) : setup_postdata($post); ?>
- <option value="<? echo $post->ID; ?>"><?php the_title(); ?></option>
- <?php endforeach; ?>
- </select>
- <input type="submit" name="submit" value="view" />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement