Show your posts, pages, and terms alphabetically in a Rolodex-, catalogue-, or directory-style list with the A-Z Listing plugin!
The plugin has a shortcode for the list, and a widget so you can link to the list from anywhere on your site. If a letter doesn’t have any pages then the widget will display the letter unlinked. The list page will omit the display for that letter entirely.
Show posts from any or multiple post types including the in-built posts and pages. Also supported are post-types from plugins like WooCommerce products. Alternatively, show terms like categories or tags.
Installation
Requirements
- PHP 5.6 is the minimum version you should be using. Preferably use the most-recent version of PHP your host offers; PHP 7.2 is ideal. Older versions of PHP than 5.6 are unsupported.
- Your web-host should have
mbstring
turned-on in your PHP installation. Without this feature the plugin might behave oddly or fail.
Instructions
- Upload the
a-z-listing
folder to the/wp-content/plugins/
directory. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Use the
[a-z-listing]
shortcode on the page or post that you want to show the listing. - Add the A-Z Site Map widget to a sidebar.
Usage Examples
The plugin supplies a shortcode for the full A-Z listing allowing use without modifying your theme’s templates.
The simplest invocation which displays pages
:
[a-z-listing]
To specify a post-type to display instead of page
then use, e.g. post
:
[a-z-listing display="posts" post-type="post"]
To filter the posts by a term from a taxonomy:
[a-z-listing display="posts" taxonomy="category" terms="my-term-slug"]
To display pages that are direct children of the page with ID 24
:
[a-z-listing display="posts" post-type="page" parent-post="24"]
To display pages that are children of any depth below the page with ID 24
:
[a-z-listing display="posts" post-type="page" parent-post="24" get-all-children="yes"]
To show terms from a taxonomy instead of posts and pages, e.g. Terms from the Categories
taxonomy:
[a-z-listing display="terms" taxonomy="category"]
To show terms from the Categories
taxonomy that are direct children of the term with ID of 42
:
[a-z-listing display="terms" taxonomy="category" parent-term="42"]
To show terms from the Categories
taxonomy that are children of any depth in the tree below the term with ID of 42
:
[a-z-listing display="terms" taxonomy="category" parent-term="42" get-all-children="yes"]
To override the alphabet used by the plugin:
[a-z-listing display="posts" alphabet="Aa,Bb,Cc,Dd,Ee,Ff,Gg,Hh,Ii,Jj,Kk,Ll,Mm,Nn,Oo,Pp,Qq,Rr,Ss,Tt,Uu,Vv,Ww,Xx,Yy,Zz"]
To add numbers to the listing:
[a-z-listing display="posts" numbers="after"]
The numbers can also be shown before the alphabet:
[a-z-listing display="posts" numbers="before"]
You can group the numbers into a single collection for all posts beginning with a numeral:
[a-z-listing numbers="after" group-numbers="yes"]
To group the alphabet letters into a range:
[a-z-listing grouping="3"]
More information about the available options and the values they accept.