how to display list of all pages in wordpress
To display a list of all pages in WordPress, you can follow these steps:
- Login to your WordPress admin dashboard.
- Go to the "Appearance" menu and click on "Widgets".
- Locate the widget area where you want to display the list of pages and click on the corresponding "Add a Widget" button.
- In the widget search bar, type "Pages" and select the "Pages" widget from the available options.
- Drag and drop the "Pages" widget into the desired widget area.
- Configure the widget settings:
- Title: Enter a title for the widget (optional).
- Sort by: Choose how you want the pages to be sorted (e.g., by title, by date).
- Sort order: Select the order in which you want the pages to be displayed (e.g., ascending, descending).
- Exclude: Enter the IDs of any pages you want to exclude from the list (optional).
- Depth: Specify the depth of the page hierarchy to display (e.g., 0 for top-level pages only, 1 for top-level and their immediate child pages).
- Show page hierarchy: Check this box if you want to display the page hierarchy (parent-child relationship) in the list.
- Display as dropdown: Check this box if you want to display the pages as a dropdown menu.
- Once you have configured the settings, click on the "Save" or "Publish" button to save the widget.
- Visit your website's front-end to see the list of pages displayed in the chosen widget area.
Note: The specific steps may vary slightly depending on the version of WordPress or the theme you are using.