A blank page that you want to list something like Posts or Products from WordPress on.

Let’s say you have a blog page and you want to create an A-Z Index of your WooCommerce products in a certain category on a blank page. First, create a page.

Then, click the icon in the screenshot below. Click image to enlarge.

The box below will pop up:

Click the box that says “Generate Content”. The interface will change to the one below:

Select the Post Type dropdown. If you have WooCommerce installed, there should be a “Post Type” called product. Select this.

You will now see that the categories box will change. This allows you to specify a product category too if you wish. Default is to show all.

Now click “Add A-Z Index”. This will add a shortcode like the one below, and should generate the required content.

[azindex content=”true” posttype=”product”]

A completely new Index you want to build from scratch.

Use the A-Z Index Posts Menu in the WordPress Admin to add all your posts and post categories.

Then just follow the same procedure as above, EXCEPT set the Post Type to “azindexcustom”.

An existing category page (e.g. a blog category)

This is a bit more tricky and requires you to be comfortable with editing WordPress template files.

Let’s assume your category is called blog ….

For this to work, in your theme, you need to put the following code in the file
category-blog.php if it exists or category.php if category-blog.php doesn’t exist where you want the index to appear:
<?php azindex_category(); ?>

Then you also need to go into the category and change the settings as shown below:

An existing page that has some sort of a list on it already (e.g. a testimonials page, or a WooCommerce product listing)

Please note that this may or may not work, it depends on how the page template is set up, in more technical terms if it uses the WP loop or not. The only way to find out is to try.

Say for example we are looking to add an A-Z Index to a Page like the one above, a portfolio listing. First, we open the page in the WordPress editor. Then we click the icon shown in the screenshot below:

This gives us the dialog box below. You can add your own custom index here.

It’s not working / Debugging

BEMO A-Z Index has a built in debugger to see what is actually being filtered.WordPress runs several queries and depending on what plugins you are using, what themes etc you may be filtering the wrong query. The debugger lets you see what the right Target query is.

If you click the “Debug” checkbox, save your page, and then load it, click on an index letter (the debugger won’t do anything until you do this), you should get output like the following:

Various custom index examples

Indexes should be uppercase, and contain commas between each index. They can be single characters or a range.