Use get_pages()
to fetch an array of page objects, then pass that result to wp_list_pluck()
to extract an array of just page titles:
$page_titles = wp_list_pluck( get_pages(), 'post_title' );
print_r( $page_titles );
Related Posts:
- How does wordpress calculate the page depth?
- Check whether the child page has siblings
- How to echo excerpts with wp_list_pages?
- Extra title output with this function wp_list_pages
- List child pages by slug not ID?
- Combining ‘depth’ with ‘include’ in wp_list_pages()
- Get the ID of the direct parent page
- Get parent of current page
- Post Fetching Ignoring Sort_Column?
- Exclude pages by menu order
- Change page name in admin list
- Check if the child page has sibling pages, and bookmark current page
- Keep page hierarchy in wp_list_pages, even if on a child or grandchild
- Check if page has subpages
- How should I set up a Tumblr blog at a WordPress Page?
- Translate dashboard metabox
- Include parent page in list of child pages
- wp_list_pages get the hole hierarchy for current page
- Remove and change pages label
- How To List Sibling Pages And Include The Featured Image?
- How to make in post Parent page children page list nummbered
- Custom wp_list_pages() function
- Get page id by template
- How to load JS and CSS only on specific Pages using is_page()?
- Listing pages which uses specific template [duplicate]
- How to add jQuery script to an individual page?
- WordPress page edit does not save selected template
- Automatically set page order on create page
- WP is not using the select custom template.php that its selected for a page
- Is it possible to set a page template on a dynamic home page (articles list)?
- Page with page template not using template in Preview
- Subpages return 404 error [closed]
- wordpress with many custom styled static pages
- wp_dropdown_pages default value
- User capability of create page/new page
- A function like is_page() but returns true if on any sub page of given page
- How to get the excerpt of a page before more tag?
- is_page condition not working
- Using page slug in array
- Get all children page ID’s including parent by title
- How to modify the default WordPress ‘Pages’ widget to have titles on the anchor tags?
- I have index.php and other files, how do I display other pages?
- is_home() returns TRUE on page template
- Created php page in wordpress – Error Page can not be reached
- Adding New Users to Your WordPress Site for edditign only one page
- Multiple alias for single page
- Removing Parent Page URL While Keeping the Navigation Intact
- Organizing Your Pages
- Custom page template for multiple pages
- IF user is logged in only show certain page
- No Appearance panel is shown
- hard coded html / php pages on local host directory don’t show up in WP dashboard
- the_content of template page
- loading a javascript on a WP PAGE
- Styling Previous/Next Pages differently from Index
- Page access only from a specific page in wordpress website
- How to show ‘tags’ in ‘WordPress Pages’ [not Posts]
- How can I change “page” (as in foobar.com/page/5) to another word?
- determine whether content is of type Page or a Post and display accordingly
- Automatically generate pages from SQL
- require_once not working
- Undefined index: post in NOTICE while adding meta box
- is_single(); Question
- Showing Different Code on Pages With Different Layouts
- How to make title for home to be News, but if page has parent then its name else just post/page name
- Get all pages to display at once
- Show specific page on main index instead of latest
- Add Filter to Ignore a Post/Page or a Number of Post/Pages
- I want to create a Weebly site and have it show up as static pages on a WordPress site
- How to use the full page
- anchor tag in header not working on other pages except the home page
- Set parent page based on custom metabox value
- Add string to page title if post in specific category
- How to make transition slider load before home page
- Block to Popup Page, on demand?
- Odd twitter meta data description on all pages
- URL redirect to home page issue in word press site
- How to sorted Parent Page in WP-admin
- Displaying all pages which comes under a category id
- If page or sub page not working as expected
- How to see the dashboard of a downloaded wordpress website?
- Access link page and not folder content of that link
- How can I get the page from menu as posts?
- Custom Upload Adds Ghost File
- Displaying Content Only in Certain Page IDs Not Working
- How to display data with pagaination on backend?
- How to Change the path of a child page?
- Annoying notification when trying to create a new page
- Page stuttering on load
- WP Template Hierarchy – Need help choosing the correct templates
- the_content() Returns post content when I want page content
- disable trashability for certain pages
- how bbPress and buddypress add their own page templates to the page template drop down on the page editing screen
- Can’t select a page using is_page()
- pages won’t show on front page using loop or pre_get_posts
- Does WordPress list all pages for crawlers?
- List of pages – AJAX load more
- one time visit to the page
- How to display text of a page in home or custom page?