Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <select>
- <?php
- $postlist = get_posts( array('posts_per_page'=>-1,'post_type'=>'page'));
- foreach ($postlist as $page): ?>
- <option value="<?php echo get_permalink($page->ID); ?>" <?php if (get_the_ID() == $page->ID){ echo 'selected="selected"'; } ?>><?php echo $page->post_title; ?></option>
- <?php endforeach;
- ?>
- </select>
Add Comment
Please, Sign In to add comment