WordPress alphabetical index: Create an A-Z listing of any content

February 8, 2021

Let me guess: You've been searching for a WordPress A-Z plugin but none of them do exactly what you want them to do. Now, you need to create an alphabetical listing of your WordPress content but maybe you're not sure how to get started.

Don't worry - we've got you covered.

In this post, I'll show you how to use the Posts Table Pro plugin to create a WordPress alphabetical index from any type of content on your site - posts, pages, custom post types... you name it! You can use this to create A-Z listings, with posts listed by letter. Or maybe a WordPress glossary, where people can click on the A-Z letters or numbers to view the listings under each one.

Example of WordPress A-Z listing for movies

Let's get started so you can have a working solution to your problem as soon as possible!

How to create a WordPress alphabetical index or list

To demonstrate how to create a WordPress alphabetical index, I’m going to use a real-life example of creating an A-Z movie index where visitors can click on any letter to jump straight to movies with names that start with that letter.

You can see an example of the end result below:

final wordpress a-z listing of movies

The process that I show you can work for anything, though. This means you'll be able to adapt this same basic approach to anything from regular WordPress posts to custom post types to numerical indexes and even WooCommerce products.

Posts Table Pro - the perfect WordPress A-Z plugin

While there are some simple WordPress A-Z plugins, most of them force you into using a single preset layout and only apply to regular WordPress posts.

On the other hand, by using Posts Table Pro, you’ll be able to:

  • Create an A-Z index for regular posts, pages, or custom post types
  • Manipulate your WordPress alphabetical index to show only the exact information that you want
  • Include data from custom fields in your index

You can see a live example of the types of indexes that Posts Table Pro can help you create at this demo page.

Here’s everything you need to create your WordPress alphabetical index

And if your theme doesn't already have functionality for tabs or toggles, you'll also need:

  • Shortcodes Ultimate plugin (free), optional, but makes it easy to create clickable tabs to divide your index by the letters in the alphabet.

Posts Table Pro
Create an A-Z listing of the content on your WordPress site.

The entire process in a nutshell

I’m going to break down every single step in more detail. But before I do that, I want to give you a high-level look at the process so that you have an idea where this article is going.

To create a WordPress alphabetical list you’ll:

  1. Decide between listing regular posts, pages, or using a custom post type
  2. Create a custom taxonomy that you’ll automatically add the first letter of the post to using a code snippet (for easy alphabetization) - or you can set the letters manually if you don't want to edit any code
  3. Create a list of content for each letter using the Posts Table Pro shortcode
  4. Display those lists in a tabbed-interface using Shortcodes Ultimate (or something similar)

Let’s get started!

Step 1: Decide what content you want to index

Posts Table Pro lets you index and alphabetize content from:

  • Posts
  • Pages
  • Custom post types

So if you haven’t already, it helps to think of the best way to store the content that you want to index.

  • Posts - typically, people use the default posts to store blog posts. So if you want to create an alphabetical index of your blog posts, this is what you want.
  • Pages - pages are generally more for static content. You can create an index of your pages, but for more specialized content, you'll probably want a custom post type instead.
  • Custom Post Type - custom post types are flexible and good for storing non-standard content, like a movie entry, staff member, and more.

For this demo, I’m going to use a custom post type to store the movie entries. But if you want to use regular posts, instead, it’s as simple as removing one tiny little phrase later on the article (I’ll explain this when we get there!).

Step 2: Create custom post type using Pods

If you’re going to use regular WordPress posts instead of a custom post type, you can click here to skip straight to the next step.

To create your custom post type, install and activate the free Pods plugin. Then:

  • Go to Pods Admin → Add New in your WordPress dashboard
  • Click on Create New to create a new content type
how to create a new custom post type

Then, make sure the Content Type is set to Custom Post Type, give it a singular and plural label, and click Next Step.

For this example, that will be “Movie” and “Movies”. But again, you can adapt this to anything - “Staff Member”, “Artist”, “Document” - you name it!

enter custom post type details

That’s it for now! You should see your new custom post type show up in the WordPress sidebar.

I’ll cover some neat enhancements - like adding custom fields - later on. But for now, you’re ready to move on to the next step.

Further reading: Pods: An Easy Way to Create WordPress Custom Post Types, Custom Fields & Taxonomies

Step 3: Create a custom taxonomy

In order to index content alphabetically, you need to create a taxonomy for Posts Table Pro to filter content based on.

Essentially, you create the Alphabetical Letter taxonomy and assign each post a taxonomy for the first letter in the post's title (don’t worry - I’ll show you a way to do this programmatically so that you don’t need to manually set the taxonomy for every content item).

For my movie example:

  • “Eat Pray Love” would get “E”
  • “Conspiracy Theory” would get “C”
  • Etc.

Here’s how to create the necessary taxonomy:

If you skipped here from Step 1, you’ll need to install and activate the Pods plugin before you continue.

  • Go to Pods Admin → Add New in your WordPress dashboard
  • Click on Create New to create a new content type
how to create a new custom post type

Then, select Custom Taxonomy from the drop-down and enter “Alphabetical Letter” and “Alphabetical Letters” for the labels (the actual name isn’t especially important - just make it easy to remember). Then, click Next Step:

how to create a custom taxonomy

You should now be in the Edit Pod interface.

Go to the Advanced Options tab and:

  • Uncheck the Hierarchical box (because we’re only going to use the 26 letters of the alphabet, there’s no hierarchy involved)
  • Choose the relevant Associated Post Types

For my example, I want to associate the taxonomy with the Movies post type. But if you want to use regular WordPress posts instead, you would associate it with the Posts type:

associate taxonomy with post type

After making those changes, make sure to click Save Pod.

Step 4: Add content using the custom taxonomy

Now, if you go to add new content using regular posts or your chosen custom post type, you should see the new Alphabetical Letters taxonomy.

Add your content, making sure to add the appropriate letter to the Alphabetical Letters taxonomy for each piece of content.

add custom taxonomy to create a wordpress alphabetical index

How to add the taxonomy programmatically

For small amounts of content, it’s fine to add the taxonomy manually. But if you’re dealing with large amounts of content, you might prefer a method that doesn’t require you to manually input the taxonomy every single time.

Thankfully, you can do that using some basic code. Essentially, this code snippet will automatically chop off the first letter of any piece of content and add it as a taxonomy - no manual input required!

While you’ll need a tiny bit of PHP knowledge to get this done, it’s nothing too complex. Here’s the code I used for my example (credit to Kathy Is Awesome for this snippet):

Note - assisting with code snippets is outside of our plugin support. If you're not comfortable editing code yourself, we recommend using Codeable to find a developer who can do this for you.

Need professional assistance?
We've partnered with Codeable to provide our customers with expert help if required.
/* When the post is saved, saves our custom data */
function kia_save_first_letter( $post_id ) {
 // verify if this is an auto save routine.
 // If it is our form has not been submitted, so we don't want to do anything
 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
 return $post_id;

//check location (only run for posts)
 $limitPostTypes = array('post');
 if (!in_array($_POST['post_type'], $limitPostTypes)) 
 return $post_id;

// Check permissions
 if ( !current_user_can( 'edit_post', $post_id ) )
 return $post_id;

// OK, we're authenticated: we need to find and save the data
 $taxonomy = 'glossary';

//set term as first letter of post title, lower case
 wp_set_post_terms( $post_id, strtolower(substr($_POST['post_title'], 0, 1)), $taxonomy );

//delete the transient that is storing the alphabet letters
 delete_transient( 'kia_archive_alphabet');
add_action( 'save_post', 'kia_save_first_letter' );

To make this code your own, you need to:

  • Replace post in array('post'); with the name of your custom post type (only if you’re using a custom post type).
  • Replace glossary in  $taxonomy = 'glossary'; with the name of your actual taxonomy

To find the name of your taxonomy and/or custom post type, click on Pods Admin and look at the Name column:

how to find taxonomy name

You can then add this code to your site using a plugin like Code Snippets (I marked the two areas that you need to modify with arrows to make things clear):

where to replace code snippets

Once you add the code, you’ll no longer need to manually edit the taxonomy for each piece of content. Instead, WordPress will automatically take the first letter of the post and add it to the taxonomy whenever you publish or update the piece of content.

You can see this in action below:

Step 5: Generate Posts Table Pro shortcode

Now, you’re ready to create the various alphabetical lists of your content. To do this, you’ll use the Posts Table Pro plugin shortcode.

To build the shortcode, you’ll do four things:

  1. Choose which type of content you want to display - either regular posts or your custom post type
  2. Choose which columns you want to display, which allows you to control what information shows up in your index (I’ll show you how to add custom fields to this later on)
  3. Filter the Alphabetical Letter taxonomy to return only posts that start with the relevant letter
  4. Sort each list to make it alphabetical within that letter (if needed)

The basic Posts Table Pro shortcode looks like this:


To accomplish the steps above, you’ll need to add various shortcode parameters for each function.

Choose which type of content to display

By default, Posts Table Pro automatically displays regular WordPress posts. That means if you’re displaying regular posts alphabetically, you don’t need to do anything here. Skip to the next section!

If you’re displaying custom post types or pages, though, you’ll need to add the post_type parameter.

For example, to display content from the Movies post type in my example, you’d add the parameter like this:

[posts_table post_type="movie"]

The name of the post type is that same one that you used in the previous steps and can be found in the Edit Pods interface.

Choose which columns to display in your table

Now that you’ve selected what type of content to display, you need to choose the specific information that you want to display as columns in your table. For example, depending on what you’re displaying, you might want to show:

  • Post title
  • Custom fields
  • A link or buy button
  • Etc.

To do that, you use the columns shortcode parameter. For example, here’s how to create a basic table that displays just a post’s title:

[posts_table columns="title" post_type="movie"]

You can display additional columns by separating each column with a comma.

At the end of this article, I’ll give you an example for how you can show more information using custom fields that you add with Pods.

Filter posts to display them alphabetically and set sort order

The shortcode above will display every single post, which isn’t great for creating a WordPress alphabetical index!

To fix that, you can use the term shortcode parameter to only return posts that start with that letter:

term="<taxonomy slug>:<term slug or ID>"

The part before the colon is the actual name of your taxonomy, while the part that comes after is the letter you want to filter for.

For example, to filter out just posts that start with “a”, you would use this:

[posts_table columns="title" post_type="movie" term="alphabetical_letter:a"]

To filter out posts for each letter, you’ll use 26 different shortcodes, changing the letter in the term parameter each time.

If you want to include numbers 0-9 because your list might include some numeric options, you could also include a shortcode that targets all 10 numbers.

To make sure the list is alphabetical for each letter, you can further add the sort_by shortcode parameter to order things alphabetically. For example:

[posts_table columns="title" post_type="movie" term="alphabetical_letter:a" sort_by="title"]

Step 6: Create tabs using Shortcodes Ultimate plugin and insert shortcode

example of wordpress a-z listing tabs

If you want to create a set of clickable tabs like the example above, Shortcodes Ultimate provides an easy, theme-agnostic solution. With that being said, if your theme does include already functionality for tabs/toggles, we recommend using that first. If not, go for Shortcodes Ultimate!

To get started:

  • Install and activate the free Shortcodes Ultimate plugin
  • Go to the WordPress editor for the page you want to add your WordPress alphabetical index to
  • Click on the new Insert shortcode button above the editor toolbar (or use a block if you're using the Gutenberg editor)
  • Select the Tab option
how to use shortcodes ultimate
  • Enter “A” in the Title and Anchor
enter letter
  • Enter the Posts Table Pro shortcode in the Content box
  • Click Insert Shortcode
  • Repeat the process for each letter in the alphabet, making sure to change the letter in the Posts Table Pro shortcode each time to display the correct taxonomy term

Once you’ve added 26 shortcodes for all the letters in the alphabet (27 if you want to collectively include numbers 0-9 as a separate option), wrap the entire set of shortcodes in the [su_tabs] shortcode. You should have a separate [su_tab] shortcode for each letter of the alphabet, each containing a Posts Table Pro shortcode.

If you get stuck, skip ahead. I've provided some sample shortcodes that you can copy and paste straight into your page.

You can see roughly what it looks like below:

wrap all the shortcodes

Sample A-Z shortcode for you to copy

If the above seems a bit tricky, don't worry. Here's a set of sample shortcodes that you can use to get started. Just paste the entire group into your page, then replace 'alphabetical_letter' with the actual name of the taxonomy you're using to tag your posts with the correct letter":

[su_tab title="A"] [posts_table term="alphabetical_letter:a"] [/su_tab] 
[su_tab title="B"] [posts_table term="alphabetical_letter:b"] [/su_tab] 
[su_tab title="C"] [posts_table term="alphabetical_letter:c"] [/su_tab] 
[su_tab title="D"] [posts_table term="alphabetical_letter:d"] [/su_tab] 
[su_tab title="E"] [posts_table term="alphabetical_letter:e"] [/su_tab] 
[su_tab title="F"] [posts_table term="alphabetical_letter:f"] [/su_tab] 
[su_tab title="G"] [posts_table term="alphabetical_letter:g"] [/su_tab] 
[su_tab title="H"] [posts_table term="alphabetical_letter:h"] [/su_tab] 
[su_tab title="I"] [posts_table term="alphabetical_letter:i"] [/su_tab] 
[su_tab title="J"] [posts_table term="alphabetical_letter:j"] [/su_tab] 
[su_tab title="K"] [posts_table term="alphabetical_letter:k"] [/su_tab] 
[su_tab title="L"] [posts_table term="alphabetical_letter:l"] [/su_tab] 
[su_tab title="M"] [posts_table term="alphabetical_letter:m"] [/su_tab] 
[su_tab title="N"] [posts_table term="alphabetical_letter:n"] [/su_tab] 
[su_tab title="O"] [posts_table term="alphabetical_letter:o"] [/su_tab] 
[su_tab title="P"] [posts_table term="alphabetical_letter:p"] [/su_tab] 
[su_tab title="Q"] [posts_table term="alphabetical_letter:q"] [/su_tab] 
[su_tab title="R"] [posts_table term="alphabetical_letter:r"] [/su_tab] 
[su_tab title="S"] [posts_table term="alphabetical_letter:s"] [/su_tab] 
[su_tab title="T"] [posts_table term="alphabetical_letter:t"] [/su_tab] 
[su_tab title="U"] [posts_table term="alphabetical_letter:u"] [/su_tab] 
[su_tab title="V"] [posts_table term="alphabetical_letter:v"] [/su_tab] 
[su_tab title="W"] [posts_table term="alphabetical_letter:w"] [/su_tab] 
[su_tab title="X"] [posts_table term="alphabetical_letter:x"] [/su_tab] 
[su_tab title="Y"] [posts_table term="alphabetical_letter:y"] [/su_tab] 
[su_tab title="Z"] [posts_table term="alphabetical_letter:z"] [/su_tab]

Enjoy your new WordPress alphabetical index

Now, if you Publish your page, you should be able to see your WordPress alphabetical index.

Here’s what my example looks like after adding a few more movies. I’ll use a GIF so that you can see how the alphabetization works:

example of wordpress alphabetical index

If you want to remove the search, filter, and/or pagination options, you can add additional shortcode parameters to further customize how things look and function.

And if you want to enhance your index with more information, here’s a neat way to display extra information using custom fields...

Enhancing your WordPress alphabetical index with custom fields

Because Posts Table Pro can display custom fields, you can use custom fields to display additional information as a separate column in your index.

For example, in my alphabetical movie list, it might be helpful to include extra information for things like:

  • Release Date
  • Director
  • Etc.

Here’s how to do it:

Step 1: Add custom fields using Pods

To add custom fields to a custom post type using Pods, just edit that custom post type from the Pods interface.

On the other hand, if you want to add custom fields to your regular WordPress posts, you’ll need to:

  • Go to Pods Admin → Add New
  • Choose the Extend Existing option
  • Select Post Types in the Content Type drop-down
  • Choose Posts in the Post Type drop-down
how to add custom fields

Once you’ve done that, you should see the same Edit Pod interface as if you were editing an existing custom post type.

To add a field, click the Add Field button and then configure the field type and other information:

extending regular posts

For example, here’s what it looks like after I’ve added fields for Director and Release Date:

example of custom fields

Once you save your changes, you’ll be able to add information directly to those fields if you go to the relevant post type:

adding custom fields

Step 2: Include custom fields as columns in Posts Table Pro shortcode

Now that you have your custom fields, all that’s left to do is include them in the columns shortcode parameter in your Posts Table Pro shortcode. To do that, add a comma between each column you want to display.

To add custom fields, you use this format:

cf:<field name>

You can find the field name in the Edit Pod interface:

custom field names

So to add columns for Director and Release Date to my example from before, I would use this shortcode:

[posts_table columns="title,cf:director,cf:release_date" post_type="movie" term="alphabetical_letter:e"]

Put it all together, and my example alphabetical movie index looks like this:

final wordpress a-z listing of movies

You may also like: How to use a WordPress index plugin to list pages, posts or any custom post type.

Create a WordPress numerical index with tabs for numbers 0-9

So far, you've learned how to create an A-Z alphabetical index in WordPress. If you'd like to create a numerical index - for example with tabs for numbers 0-9 - then the instructions will work for that too.

To get started quickly, copy this entire block of shortcodes into your page:

[su_tab title="0" anchor="0"] 
[/su_tab] [su_tab title="1" anchor="1"]
[/su_tab] [su_tab title="2" anchor="2"]
[/su_tab] [su_tab title="3" anchor="3"]
[/su_tab] [su_tab title="4" anchor="4"]
[/su_tab] [su_tab title="5" anchor="5"]
[/su_tab] [su_tab title="6" anchor="6"]
[/su_tab] [su_tab title="7" anchor="7"]
[/su_tab] [su_tab title="8" anchor="8"]
[/su_tab] [su_tab title="9" anchor="9"]
[/su_tab] [/su_tabs]

To make it work on your site, you'll need to replace the term name with the correct name of the taxonomy that you're using to tag your posts with the correct number. For example, if your taxonomy is called 'numeral_index' then you would need to change term="number:0" to term="numeral_index:0".

Creating An Alphabetical Index Of WooCommerce Products

All the steps that I’ve shown you in this article can be easily adapted to create a WordPress alphabetical index of WooCommerce products using our WooCommerce Product Table plugin.

Essentially, you’ll perform identical steps to everything I’ve discussed above but focusing on the product post type that WooCommerce creates.

Here’s a quick summary of the steps that you’ll want to take:

  • Use Pods to create a new Alphabetical Letter custom taxonomy that is associated with the Products post type
  • Take the same code snippet from Step 4 and apply it on the product post type to programmatically add the product’s first letter to the Alphabetical Letter taxonomy that you created
  • Use the WooCommerce Product Table shortcode to filter products by taxonomy and control what information is displayed
  • Add the WooCommerce Product Table shortcode to tabs that you create with Shortcodes Ultimate

The advantage of using WooCommerce Product Table is that you'll be able to easily include product images, Buy buttons, and other eCommerce-focused information in your alphabetical product table.

Posts Table Pro is your flexible WordPress A-Z plugin

If you want to create a flexible WordPress alphabetical index, Posts Table Pro gives you all the functionality that you need.

You'll be able to organize any type of content, including custom post types. And you'll also be able to manipulate your content's front-end display by choosing exactly what shows up in the index, including custom fields.

Remember - to create the alphabetical list like the example above, all you need is:

  • Posts Table Pro (or WooCommerce Product Table if you want to create an alphabetical list of WooCommerce products)
  • Pods to create the custom taxonomy and/or custom post type
  • Shortcodes Ultimate to display everything in a tabbed A-Z list (or your theme's built-in options)

Have any further questions about how to create a WordPress alphabetical index? Leave us a comment and we'll try to help out!

Posts Table Pro
Create an A-Z listing of the content on your WordPress site.


  1. Norman Furnell
    May 16, 2021 Reply

    I have one page in my website with a mixture of links and text. The page is ordered as an alphabetical list starting with the upper case letter in question as a heading: e.g.: E Endangered species include xxxx See World Wildlife: https://www.worldwildlife.org/. F Frog species in Europe xxxxxx . G... and so on
    Each letter of the alphabet heading will have text and one or more links. The info would need frequent updating and editing. It would be helpful to have an 'Alphabet key' at the start to go to any heading letter chosen. Can you help with this type of page please.

    • Edge
      May 18, 2021 Reply

      Hi, Norman. Thanks for your comment. For what you'd like to achieve;

      • You can continue with the current layout of your page and display an A-Z alphabet key at the start/top using HTML anchor links per letter (source) that when clicked would jump to their corresponding letter heading (destination) on the page. I've found an article by our recommended web hosting provider Kinsta, that shows you How to Create Anchor Links in WordPress (4 Easy Methods).
      • On the other hand, you can also use our Posts Table Pro plugin as described in this article to take your current page a step further and organize all your links and their descriptive text in a table-based A-Z listing that you can filter and search much more efficiently.

      I hope this makes sense and helps. Let me know if you have any questions. You can also contact us via our dedicated Support Center to discuss this in more detail. Cheers!

  2. swathi
    June 23, 2020 Reply

    Nice Article.. It is very useful for me..Thanks a lot..

    • EJ
      June 23, 2020 Reply

      Thanks for your comment, Swathi. I'm glad to hear it helps. Let me know if you have any questions. You can also get in touch with us via our Support Center.

  3. Gale
    August 14, 2019 Reply

    Hi, I managed to get a clickable A-Z menu for my posts and a custom post type, however i cannot seem to be able to get my custom posts to appear under the page where my A-Z menu is. The only thing that appears is :

    [post_table columns=”breed” post_type=”breed” term=”alphabetical_letter:a]

    How do i manage to make my custom posts appear on the page?
    Also i did not get post table pro. Is this the issue? If so, how else can I make it appear without having to buy a license for post table pro?
    Thank you.

    • EJ
      August 17, 2019 Reply

      Hi, Gale. Yes, the shortcode options used here are available in our premium Posts Table Pro plugin, rather than in our free Posts Table with Search & Sort one. For one thing, if you'll notice even the shortcodes used by the two are different: [posts_table] vs. [posts_data_table]. Thanks!

  4. Mehedi Hassan
    July 10, 2019 Reply

    Nice, and I'll try this in my website for making a Song Lyrics Database. Thanks, Great post.

    • EJ
      July 11, 2019 Reply

      Thanks for your comment. Sounds good and all the best with that!

Please share your thoughts...

Your email address will not be published.