• Hi, I’m trying to figure out if your plugin is going to be able to do this. The site uses woocommerce and we are trying to list artists alphabetically by last name. The artists are subcategories in the main category “Artists”. Currently the owner of this site has their artists entered into the back end as ‘first name followed by last name’. We are trying to do an A to Z listing based on their last name but still displaying as ‘first name last name’. I thought about creating a tag for each artist with their last name listed first which it would use to sort but am unsure how I would display it. So far I have:

    [a-z-listing display=”terms” taxonomy=”product_cat” parent-term=”130″]

    Is there a way to have it display the subcategories but have it based on tags instead of categories so that it can display artists in order by last name based on the tags but they would still display with the category display of ‘first name last name’. Is this possible?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter waterwalk

    (@waterwalk)

    As another possibility can I put all the “J” artists in a subcategory called “J” under the main category “Artists” and then have it list just those artists in that one subcategory “J”. I tried experimenting with that but can’t get it to work. It’s not ideal as I would really prefer not to have a letter subcategory for each letter of the alphabet but I’ve spend a couple days on this plugin and a couple of others and still haven’t found a solution.

    Plugin Author Dani Llewellyn

    (@diddledani)

    You have two options.

    First, you could use the a_z_listing_item_index_letter filter provided by the plugin to customise the letter for each item. Your function should access $item->post_title or $item->term_name depending on whether it is a WP_Post or WP_Term object. The function should return an array of index letters in lower-case for the item. If you return more than one index letter then the item will be listed multiple times allowing you to create aliases.

    The second way is to use the pre-packaged proper nouns extension that I sell in an attempt to help cover the costs of developing the main plugin. The documentation for the extension is available (the docs are broken at time of writing, but a fix is being deployed as I type) at https://a-z-listing.com/proper-nouns-extension-for-a-z-listing/a-z-listing-proper-nouns-usage-instructions/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Alphabetical sorting of categories’ is closed to new replies.