A-Z Index
This article covers how to setup an alphabetical list of pages within the Classic Editor or the Block Editor.
Classic Editor
To assign a page to the A-Z index template, locate Page Attributes on the right side of the editing screen.
Under Template, select A-Z Index.
For a working example, view the Aurora site’s A-Z Index.
Excluding Pages
By default, the A-Z Index will display every single published page on the site, but it is possible to override that behavior and leave certain pages out.
Find the ID number of the page you wish to exclude. Edit the page in question, and look at the URL bar in your browser. You will see a number there that looks like this (ex. 1799).
Edit the A-Z Index Page. Scroll down and select Custom Fields.
If this box does not appear, select Screen Options at the top right of the page and select the box next to Custom Fields. Scroll down and look for it again.
In the Custom Fields box, add a new custom field called Exclude, and add the number of the page to exclude. When adding multiple pages, use a comma to separate the ID numbers.
Save the changes you made.
Excluding 0-9 From A-Z Index
If your website has no pages with titles beginning with a number, consider excluding 0-9 at the top of your A-Z Index page.
To get rid of these numbers, add the following CSS code to your Custom CSS:
#page-az .btn-group:nth-child(2) {
display: none;
}
Block Editor
The Block Editor has the Page List block that can be used to create an alphabetical list of pages. This option does not have an a-z index on the top.
Check out WordPress’s Page List block video and instructions.