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.
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.
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"]
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"]
[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.
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
.
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
.
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
.
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
.
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
.