Frequently Asked Questions

Why is the list layout completely broken?

If you are using a page-builder such as WPBakery or Elementor you need to ensure that you put the short-code into a normal text area. Placing the short-code into a preformatted text area will add <pre> tags around the listing output. These extra tags break the layout considerably.

Why is my list in a single column?

The list of items under each letter heading needs to have at least 11 items for a second column to be created. Once you hit the magic 11 items, the list will break into two columns with 6 items in the first column and 5 items in the second. When you get to 21 items a third column will be added if there is room on your page; and so-on up to a maximum of 15 columns if there is enough space, though it is unexpected that any web-page be wide enough for more than a few columns to fit. The columns will fill-up evenly once you have more than one column on the page.

How do I show posts of a different post-type (not pages) or multiple post-types (e.g. posts AND pages)?

For a Single post-type
[a-z-listing post-type="your-post-type-slug"]

For Multiple post-types
(Separate the post-types with a comma)
[a-z-listing post-type="type1-slug,type2-slug"]

How do I show posts from a specific category only?

For a Single term
[a-z-listing taxonomy="taxonomy-slug" terms="term-slug"]

For Multiple terms
(Separate the terms with a comma)
[a-z-listing taxonomy="taxonomy-slug" terms="term1-slug,term2-slug"]

How do I show terms from a taxonomy instead of posts?

[a-z-listing taxonomy="taxonomy-slug" display="terms"]

The taxonomy parameter takes a single taxonomy’s slug, e.g. category or post_tag, and the display="terms" attribute is required to display taxonomy terms instead of posts.

How do I remove section targeting or limit which sections are available?

In your theme’s functions.php file add the following code:

<?php
add_filter( 'a-z-listing-sections', '__return_empty_array' );
?>

This filter may also be used, by removing entries which are standard $post variables, to limit which top-level pages are used as section identifiers.

If there is code already in your theme’s functions.php file then add just the lines between <?php and ?> on the line directly after the very first instance of <?php.

I am not using the short-code so the styles are not working, can I still use the in-built styles without the short-code?

In your theme’s functions.php file add the following code:

<?php
add_filter( 'a-z-listing-sections', '__return_empty_array' );
?>

This filter may also be used, by removing entries which are standard $post variables, to limit which top-level pages are used as section identifiers.

If there is code already in your theme’s functions.php file then add just the lines between <?php and ?> on the line directly after the very first instance of <?php.

I am not using the short-code so the styles are not working, can I still use the in-built styles without the short-code?

Yes you can. This needs the following code added to your theme’s functions.php file. We purposely only display the stylesheet on pages where the short-code is active.

<?php
add_action( 'init', 'a_z_listing_force_enable_styles', 99 );
?>

If there is code already in your theme’s functions.php file then add just the lines between <?php and ?> on the line directly after the very first instance of <?php.

The sidebar widget styling also works in a similar manner, and will also respond to the same code above to forcibly enable it.

You can add code which detects the page which the user is browsing and only enable the override on that page so that network requests are kept to a minimum (this is the same reason we detect usage of the short-code).

<?php
add_action( 'init', 'your_override_wrapper_function', 99 );
function your_override_wrapper_function() {
if ( ! is_page( 'your-a-z-listing-page-slug-or-ID' ) ) { // ID is numeric, slug is a string.
return; // we don't want to run for anything except the page we're interested in.
}
a_z_listing_force_enable_styles(); // this is the page we want, so run the function to enqueue the styles.
}
?>

If there is code already in your theme’s functions.php file then add just the lines between <?php and ?> on the line directly after the very first instance of <?php.

How do I disable the in-built styling?

In your theme’s functions.php file add the following code:

<?php
add_filter( 'a-z-listing-add-styling', '__return_false' );
?>

If there is code already in your theme’s functions.php file then add just the lines between <?php and ?> on the line directly after the very first instance of <?php.

How do I display the listing as a tabbed panel?

In your theme’s functions.php file add the following code:

<?php
add_filter( 'a-z-listing-add-tabs', '__return_true' );
?>

If there is code already in your theme’s functions.php file then add just the lines between <?php and ?> on the line directly after the very first instance of <?php.