Dani Llewellyn
Forum Replies Created
-
Forum: Plugins
In reply to: [A-Z Listing] page stylingThat’s an interesting theory. I’ll try to reproduce it here and see if I can work out why it’s not loading the styles when using the Block Editor.
Forum: Plugins
In reply to: [A-Z Listing] List of out of stock products in Woocommercein fact, I immediately see a mistake in my code – the third line has:
if ( $type !== 'posts' ) {but it should read:
if ( $type !== 'product' ) {Forum: Plugins
In reply to: [A-Z Listing] List of out of stock products in WoocommerceI’ll try to find some time to experiment to see if I can work out a solution for you 🙂
Forum: Plugins
In reply to: [A-Z Listing] Show main pages, but hide their child pagesHi,
To show only some pages, they need a common parent page to use as a selector. If we consider the parent page ID is 42, you can do something like:
[a-z-listing display="posts" post-type="page" parent-post="42" get-all-children="no"]If your pages don’t currently have a common parent but are “top-level” you will either need to create a new page to be their parent or if you have a “home” page then you can make that the parent of your pages and select that ID.
An alternative to using a parent page is to add a taxonomy term to each page you want in the listing and select on that instead. WordPress does not assign any taxonomies to the page post-type by default, so you will need to either add a plugin that allows you to configure one or add some PHP code to create/assign a taxonomy to the page post-type. Let’s consider you configured the “tags” taxonomy to be used with pages and added a tag called “include-in-az” then you can try something like:
[a-z-listing display="posts" post-type="page" taxonomy="post_tag" terms="include-in-az"]Forum: Plugins
In reply to: [A-Z Listing] Looking for a suggestionThe output you describe cannot be achieved with my plugin. It only supports separating items by a single character (alphabetical letter).
Forum: Plugins
In reply to: [A-Z Listing] Please, someone to tell how…Hi,
Multiple columns is the default layout the plugin uses now, so you don’t need to do any file copying to activate it (I need to update the instructions to remove that direction). If the styling isn’t correct you can force it to be enabled by adding this line to your theme’s functions.php file:
add_action( 'init', 'a_z_listing_force_enable_styles', 99 );One thing I would like to note is the plugin will only allow a second, third, etc column for a letter once it’s list has at least 11 items or 21 items for a third column. If your lists are small then you might not have enough items to force the list to break across multiple columns. You can adjust the minimum number of items by copying the file at
wp-content/plugins/a-z-listing/templates/a-z-listing.phpinto your theme’s folder and edit it to change line 21. This line normally looks like below, and you need only change the number at the end of the line to set the minimum number of items before breaking to another column:$_a_z_listing_minpercol = 10;Forum: Plugins
In reply to: [A-Z Listing] az-index-admin.php on line 68Hi,
You are using a different plugin. The names are very similar so the confusion is understandable. Please try to contact the author of azindex (this plugin is a-z-listing) at https://wordpress.org/support/plugin/azindex/ or http://azindex.englishmike.net/ (that second address is showing a server error as I reply, so you likely want to try the WordPress.org address first).
Forum: Reviews
In reply to: [A-Z Listing] Where is a-z-listing-multi-column.example.phpHi,
Sorry I didn’t get to this post sooner. The multiple column feature is now used out-of-the-box so you don’t need to do anything other than install/activate the plugin and add the shortcode to a post.
If you are not seeing the correct styling then it is likely that the plugin doesn’t realise the shortcode is active on the page being shown. This happens with some page-builder plugins depending upon how they save the shortcode definition. The good news is you can add a line of PHP to your theme’s
functions.phpfile which will force the styling to load:add_action( 'init', 'a_z_listing_force_enable_styles', 99 );I hope this helps. Otherwise, please feel free to ask for clarifications or advice and I will do my best to get you running.
Forum: Plugins
In reply to: [A-Z Listing] Display only 2 columnsAwesome. I’m glad we figured it out together 🙂
Forum: Plugins
In reply to: [A-Z Listing] Display only 2 columnsIt looks like your CSS is being cached to a CDN. If you can somehow flush that cache you should then see the changes. I suspect the CDN isn’t recognising that you have modified the CSS files directly.
Forum: Plugins
In reply to: [A-Z Listing] Display only 2 columnsWould it be ok for you to share the link to your site so that I may take a look to see if I can see why it’s not working with the changed CSS?
Forum: Plugins
In reply to: [A-Z Listing] page stylingThis indicates that the stylesheet hasn’t been loaded, which can happen if you’re using a page-builder. You can force the stylesheet to be loaded by adding the following line to your theme’s
functions.phpfile:add_action( 'init', 'a_z_listing_force_enable_styles', 99 );Forum: Plugins
In reply to: [A-Z Listing] Category ImageHi,
To add images to the output you need to copy the template from
wp-content/plugins/a-z-listing/templates/a-z-listing.phpinto your theme’s folder alongsidefunctions.phpand edit to suit.For category images, you will need to add the relevant function call to the template somewhere around line 58, which is the line that prints the category name.
As term images aren’t an out-of-the-box feature of WordPress and are provided by either custom code or another plugin, I do not know which function you need to call.
Forum: Plugins
In reply to: [A-Z Listing] Display only 2 columnsAlternatively you could try CSS like:
.letter-section ul.columns { column-gap: 0.6em; column-width: initial; } .letter-section ul.columns.max-0-columns, .letter-section ul.columns.max-1-columns { column-count: 1; max-width: initial; } .letter-section ul.columns.max-2-columns, .letter-section ul.columns.max-3-columns, .letter-section ul.columns.max-4-columns, .letter-section ul.columns.max-5-columns, .letter-section ul.columns.max-6-columns, .letter-section ul.columns.max-7-columns, .letter-section ul.columns.max-8-columns, .letter-section ul.columns.max-9-columns, .letter-section ul.columns.max-10-columns, .letter-section ul.columns.max-11-columns, .letter-section ul.columns.max-12-columns, .letter-section ul.columns.max-13-columns, .letter-section ul.columns.max-14-columns, .letter-section ul.columns.max-15-columns { column-count: 2; max-width: initial; }The downside to this method is when you only have one column for a letter the list will be full-width, which can lead to visual inconsistencies with any other letters that have two columns.
Forum: Plugins
In reply to: [A-Z Listing] Display only 2 columnsHi,
You need to modify both the
column-widthin the top selector and themax-widthin each of themax-x-columnsselectors. If you want to ensure that you never have more than two columns, then once you’ve set thecolumn-widthyou can set all the selectors formax-x-columnswherexis greater than2to have the samemax-widthsetting.For example, if you want to have columns
25emwide instead of the default15emand restrict to only ever showing 2 columns, you can add the following CSS:.letter-section ul.columns { column-gap: 0.6em; column-width: 25em; } .letter-section ul.columns.max-0-columns, .letter-section ul.columns.max-1-columns { column-count: 1; max-width: 25.6em; } .letter-section ul.columns.max-2-columns, .letter-section ul.columns.max-3-columns, .letter-section ul.columns.max-4-columns, .letter-section ul.columns.max-5-columns, .letter-section ul.columns.max-6-columns, .letter-section ul.columns.max-7-columns, .letter-section ul.columns.max-8-columns, .letter-section ul.columns.max-9-columns, .letter-section ul.columns.max-10-columns, .letter-section ul.columns.max-11-columns, .letter-section ul.columns.max-12-columns, .letter-section ul.columns.max-13-columns, .letter-section ul.columns.max-14-columns, .letter-section ul.columns.max-15-columns { column-count: 2; max-width: 50.6em; }