Hi,
The solution to this problem is largely similar to the post you linked.
Copy the template file from wp-content/plugins/a-z-listing/templates/a-z-listing.php
into your theme or child theme (using a child theme is preferable if you’re using a theme that you did not create). From there you will need to edit the template to add the function you discovered into an appropriate place. Something like this might work (this isn’t the whole template for brevity; it is amended from the original code from line 52 through to line 61 in the template as shipped in the plugin):
<?php while ( $a_z_query->have_items() ) : $a_z_query->the_item(); ?>
<li>
<?php woocommerce_subcategory_thumbnail( $a_z_listing->get_the_item_id() ); ?>
<a href="<?php $a_z_query->the_permalink(); ?>">
<?php $a_z_query->the_title(); ?>
</a>
</li>
<?php endwhile; ?>
You might want to amend the HTML inside the <li>
and </li>
tags to allow you to apply a suitable style with CSS. Here is an example with some inline-styles to use flexbox:
<?php while ( $a_z_query->have_items() ) : $a_z_query->the_item(); ?>
<li>
<div style="display: flex; flex-direction: row;">
<?php woocommerce_subcategory_thumbnail( $a_z_listing->get_the_item_id() ); ?>
<a href="<?php $a_z_query->the_permalink(); ?>">
<?php $a_z_query->the_title(); ?>
</a>
</div>
</li>
<?php endwhile; ?>