I’m currently coding my own WordPress Theme and I would like to have a (static) page that lists all the titles of the other static pages.
By static page I mean the “page” in WordPress. As you know, you can publish content on pages or on posts.
The reason is, that I want to publish the main articles on a static page and only have our blog in the post section of the WordPress dashboard. The end-user should be able to reach a page by the navigation which display a listing of the pages that are available. As there are several people that write and publish on our site, it would be very useful if we could automate the output of the content.
Thank you very much in advance!
Well…I think you should take a look at WordPress Codex.They have pretty much everything in there..!
Here is the link to get all static pages :
Here Is Ready Code For You!!!!
Displaying pages in dropdown list:
In this example a dropdown list with all the pages. Note how you can grab the link for the page with a simple call to the function get_page_link passing the ID of the page.