List all pages excluding the current one


/ Published in: PHP
Save to your folder(s)

This lists all the pages that are "Published", excluding the current one. Useful for a sitemap template.


Copy this code and paste it in your HTML
  1. global $post;
  2. wp_list_pages("exclude=$post->ID&title_li=<h2>" . __('List of Pages') . "</h2>");

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.