Dani Llewellyn
Forum Replies Created
-
Forum: Plugins
In reply to: [A-Z Listing] Customizing Styling with Thumbnail and Custom FieldsYou can customise the output html by copying the file from the plugin into your theme. The file in the plugin is at
a-z-listing/templates/a-z-listing.php
(a simpler variant is asa-z-listing/templates/a-z-listing.example.php
). Copy one of those to your theme nameda-z-listing.php
alongside yourfunctions.php
and customise to suit ??Forum: Plugins
In reply to: [A-Z Listing] I have a brand called 2WCOMIf you are using the Block Editor with the A-Z Listing block then there is an option in the block configuration to toggle “Display symbols entry first”.
Or, if you’re using the shortcode then add
symbols-first=yes
as an extra parameter.Forum: Plugins
In reply to: [A-Z Listing] Product TagsHi,
I recommend that you investigate using the A-Z Listing block in the block editor rather than the shortcode if you can. However, if you need to use the shortcode, you want it to look like this:
[a-z-listing display="terms" taxonomy="product_tag"]
Forum: Plugins
In reply to: [A-Z Listing] Problem with displaying specific post categoriesHi,
The easiest way to create a listing using taxonomies to filter the posts is to use the A-Z Listing block in the Block Editor (since WordPress 5.0) By using the A-Z Listing block all the available options are easily discoverable and configurable. The block will also prevent you from adding conflicting configurations.
Forum: Plugins
In reply to: [A-Z Listing] hide-empty-terms not workingOh, I see I failed to release the plugin properly for version 4.2.1. I’ll re-roll the release now!
Forum: Plugins
In reply to: [A-Z Listing] hide-empty-terms not workingHi,
This should have been fixed with version 4.2.1. However, if it is still broken after updating, you can try using the older (no-longer supported) attribute of
hide-empty=true
, which is still present for backwards compatibility purposes.Forum: Plugins
In reply to: [A-Z Listing] Display only letterHi,
The A-Z Listing plugin isn’t designed to display only a single letter. You can fake it with some javascript to turn the letters along the top of the listing into behaving “tab”-like. There is an example javascript in the plugin directory at:
plugins/a-z-listing/scripts/a-z-listing-tabs.js
. You can enable this as-is with the following PHP code added to your theme’sfunctions.php
file (noting that if you update your theme then thefunctions.php
will be overwritten thereby losing the changes, so you might want to investigate a child-theme for your customisations):add_action( 'wp_enqueue_scripts', 'a_z_listing_force_enqueue_tabs' );
Forum: Plugins
In reply to: [A-Z Listing] A-Z listing on Woocommerce product pageHi,
This should be possible, but I haven’t tried it. You want to either use the WordPress Block Editor and the A-Z Listing block, which provides an easier way to select the correct values via point-and-click, or a shortcode similar to:
[a-z-listing display="posts" post-type="product"]
If the shortcode above doesn’t work as expected then you may have discovered a bug.
Forum: Plugins
In reply to: [A-Z Listing] ?services= in urlHi,
If you are getting
?services=
on your URLs, this is not coming from the A-Z Listing plugin. You likely have another plugin that is appending this to the addresses generated.Forum: Plugins
In reply to: [A-Z Listing] Show only portfolio pagesHi,
Unfortunately, due to the theme being commercial, and the lack of public-facing documentation I cannot advise well.
The best way, if you can, is to use the WordPress Block Editor’s features to configure the listing by inserting an
A-Z Listing
block instead of aShortcode
block. This should show you the available post type names and taxonomy names (your portfolio categories should be a taxonomy).—
However, the concept for configuring the shortcode, should you need it, is:
- You need to find out the post-type name of the portfolio posts that WordPress uses internally – i.e. not the human-readable name in the UI (maybe it’s
portfolio
?) – if the portfolio post list page is using the default WordPress UI then the URL to the post list will be likehttps://a-z-listing.com/wp-admin/edit.php?post_type=portfolio
where the post type name is afterpost_type=
at the end of the address. - You also need to find out the taxonomy name of your portfolio categories that WordPress uses internally – i.e. not the human-readable name in the UI (maybe it’s
portfolio_cat
?) – if the portfolio categories UI is using the default WordPress UI then the URL to the UI will be likehttps://a-z-listing.com/wp-admin/edit-tags.php?taxonomy=portfolio_cat
where the name is aftertaxonomy=
at the end of the address. - You finally need to find out the term slug of the portfolio category you wish to filter the display to – if the portfolio categories UI is using the default WordPRess UI then on the list of terms page there will be a column with
Slug
as the heading. You want the value from this column
Once you have these names you need to replace them in the following shortcode:
[a-z-listing display="posts" post-type="portfolio" taxonomy="portfolio_cat" terms="category_slug"]
Here, I’ve put the placeholder names
portfolio
,portfolio_cat
, andcategory_slug
. These should be replaced to the three items you discovered above.Forum: Plugins
In reply to: [A-Z Listing] Words with accent out of orderHi,
This seems to be a bug. I expected that the plugin would correctly order based on the default alphabet groups that come with the plugin that assign
?
to the groupa
. I’ll have to take a look at the code to see what’s up, and likely issue a new version via www.ads-software.com’s directory.Ignoring “the” or adding an extra index entry for the first letter of the subsequent word after “the” will require you do do some PHP coding. There is a filter called
a_z_listing_item_index_letter
that returns the letter(s) you want the item indexed under. This does not affect the sorting inside each letter section, so all the titles beginning with “The” in the T section will be grouped together.Your filter will want to look similar to:
add_filter( 'a_z_listing_item_index_letter', 'add_extra_a_z_entry_for_titles_beginning_with_the', 10, 3 ); function add_extra_a_z_entry_for_titles_beginning_with_the( $indices, $item, $display) { $title = apply_filters( "a_z_listing_get_item_title_for_display__{$display}", '', $item ); $title_parts = explode( ' ', $title ); if ( preg_match ( '^The$', $title_parts[0], 'i' ) && count( $title_parts ) > 1 ) { // this line adds an extra index entry.. $indices[] = mb_substr( $title_parts[1], 0, 1 ); // this line replaces the existing index entry, for ignoring The entirely.. // $indices = array( mb_substr( $title_parts[1], 0, 1 ) ); } return $indices; }
Note this is a quick rough draft and will likely be broken – it is indended to be a jumping-off point for you to expand upon.
- This reply was modified 2 years, 12 months ago by Dani Llewellyn. Reason: Add ignoring The in titles as an extra example
Forum: Reviews
In reply to: [A-Z Listing] Update: Working – my fault/ updated the stars to 5Hi, I’m sorry you’re having trouble.
It sounds like you’re expecting there to be a new post type created for the A-Z Listing? The plugin provides a new A-Z Listing block for use in the Block Editor, and a shortcode for sites that aren’t using the Block Editor. There are no related post types at present. I advise using the Block Editor if you can so that all the configuration options are readily discoverable.
Forum: Plugins
In reply to: [A-Z Listing] PODS compatibility?Thanks for coming back to let me know how you got on. That’s really great to hear that pods is compatible, and that you’re enjoying the A-Z Listing block in the block editor. The block arrived with version 4.0.0 and should be considered the easiest and safest way to work out the combination of options that can be applied.
Forum: Plugins
In reply to: [A-Z Listing] Plugin doesn’t show in left admin-sidebarThere are no settings other than the shortcode or the block (which you should prefer over the shortcode if you’re using the block editor)
- You need to find out the post-type name of the portfolio posts that WordPress uses internally – i.e. not the human-readable name in the UI (maybe it’s