Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $all_pages = get_pages(); //lookup http://codex.wordpress.org/Function_Reference/get_pagesfor the parameters to get all pages
- if($pages) :
- echo '<ul>';
- foreach( $all_pages as $page ) {
- echo '<li>';
- echo $page->post_title.' - '.$page->ID;
- echo '</li>';
- }
- echo '</ul>';
- endif;
- $all_posts = get_posts(); //lookup http://codex.wordpress.org/Template_Tags/get_posts for the parameters to get all posts
- if($posts) :
- echo '<ul>';
- foreach( $all_posts as $post ) {
- echo '<li>';
- echo $post->post_title.' - '.$post->ID;
- echo '</li>';
- }
- echo '</ul>';
- endif;
- $all_cats = get_categories(); // http://codex.wordpress.org/Function_Reference/get_categories
- if($all_cats) :
- echo '<ul>';
- foreach( $all_cats as $cat ) {
- echo '<li>';
- echo $cat->name.' - '.$cat->term_id;
- echo '</li>';
- }
- echo '</ul>';
- endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement