Forum Replies Created

Viewing 15 replies - 166 through 180 (of 927 total)
  • Plugin Author Dani Llewellyn

    (@diddledani)

    If any of your posts begin with a symbol (i.e. not A-Z nor 0-9) then a new letter will show labelled #, which would conflict with your numbers letter. However, you can do this by hooking the the-a-z-letter-title filter. You could add something like this to your theme’s (or child theme’s) functions.php file:

    add_filter( 'the-a-z-letter-title', 'replace_a_z_numbers_title' );
    function replace_a_z_numbers_title( $letter ) {
    	// The numbers letter is '0' when the numbers are grouped into one letter.
    	if ( '0' === $letter ) {
    		return '#';
    	}
    	// We're not working on the numbers group so return the original letter unchanged
    	return $letter;
    }
    Plugin Author Dani Llewellyn

    (@diddledani)

    Yes, I suspect this is a server resources issue where the server is running out of memory while building the list. I still haven’t worked-out a way to mitigate this problem, but I have been working on it. For now, the only way forward (besides getting a different or bigger server, which is not acceptable :-)) is to try to limit your listing’s size via adding further terms to the posts and filtering to a smaller subset (again this is really not desirable, but it’s all I’ve got for now :-().

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    If your “book” posts are assigned a the “biography” category then you can restrict the list by adding taxonomy="category" terms="biography" into your shortcode. For example, it might leave you with a shortcode like this:

    [a-z-listing display="posts" post-type="book" taxonomy="category" terms="biography"]
    

    The terms attribute takes one or more term “slugs”, which you can find by navigating in wp-admin to the categories list where you should see a table with a “slug” column with the slugs of each category in your database.

    Plugin Author Dani Llewellyn

    (@diddledani)

    It looks like you don’t have WooCommerce enabled, so the product_cat taxonomy is not available. You likely meant to use a different taxonomy name.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Yes, the short titles is because the plugin is making room for potentially adding more columns. You can avoid this by customising a copy of a-z-listing.example.php from the plugin’s templates folder, which does not have any columnar code.

    Alternatively you can override the CSS with this to remove all columns:

    .letter-section ul.columns {
        column-width: unset;
    }
    
    .letter-section ul.columns.max-0-columns,
    .letter-section ul.columns.max-1-columns,
    .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: unset;
        max-width: unset;
    }

    You can add this either via your theme’s CSS or by using the Theme Customizer’s “Custom CSS” option.

    Plugin Author Dani Llewellyn

    (@diddledani)

    The filter will try to detect the usage of the short code in the loaded page. When you call do_shortcode directly you are bypassing that detection. For those instances, you can, instead of calling add_filter( 'a-z-listing-tabify', '__return_true' ); replace it with:

    add_action( 'init', 'a_z_listing_force_enqueue_tabs' );
    

    To target one specific listing to be tabbed is more difficult. You need to call the add_action or add_filter appropriately depending upon the page being created. One way to do this is to ensure you’re using a unique template in your theme for each of the pages and before the call to wp_head(); run the add_action or add_filter in the template that is applied to the specific page you want to be tabbed.

    Another method is to use the global $wp_query object to determine the page being loaded and run the add_action or add_filter when you’re sure you’re loading the relevant page to be tabbed. You would want to perform this in an action that occurs before the template is loaded, for example pre_get_posts.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    WooCommerce product categories are in the taxonomy called product_cat, so you likely want a short code like this:

    [a-z-listing display="terms" taxonomy="product_cat" parent-term="26"]
    

    You might also want, depending on whether your categories are multiple-levels or not, to also add get-all-children="yes", which will show all descendants (children and their children etc) rather than just immediate children.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hmm, I’m not sure why the updated name on the template isn’t being recognised. It should match. :'(

    Plugin Author Dani Llewellyn

    (@diddledani)

    Don’t forget to clear any server-side caching mechanisms when you make changes. I suspect your litespeed server is responding with an old copy of the page, tho I’m not certain.

    Plugin Author Dani Llewellyn

    (@diddledani)

    You should be able to use the “slug” of the post that you have your short-code on to target the custom template. To do this, you will rename the a-z-listing.php file in your theme that you’ve been customising to something that follows the format: a-z-listing-$slug.php where you insert the slug of your post where $slug is. The post slug is found by navigating to the block editor screen for your post and finding the URL Slug field in the Permalink box on the right-hand side of the edit screen (this post shows a few screenshots to help find it: https://wptavern.com/wordpress-5-0-beta-5-released-adds-permalink-editing-to-the-document-sidebar).

    Plugin Author Dani Llewellyn

    (@diddledani)

    Yes, this is possible by copying the default template from the plugin and removing the extra bits you don’t need. The template can be found at wp-content/plugins/a-z-listing/templates/a-z-listing.php and should be copied to your theme or child-theme’s top-level folder, e.g. wp-content/themes/$themename/a-z-listing.php.

    You will want to remove lines 24 thru 28 (the div with id letters), lines 45 thru 49 (the div with class letter-title), and lines 63 thru 67 (the div with class back-to-top).

    It may be preferable to copy and customise the other file in the templates folder of the plugin called a-z-listing.example.php, which you would need to copy to your theme and rename it to a-z-listing.php. This example template does not include the columns functionality, so you might prefer it to the default template because the columns of the default template will be applied to each letter separately.

    Forum: Plugins
    In reply to: [A-Z Listing] Not working
    Plugin Author Dani Llewellyn

    (@diddledani)

    The letters/alphabet link to places in the div with ID of az-slider. You’ve hidden this with CSS which means the links will have nowhere to navigate the page to.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    The first problem is fixable by adding hide-empty-terms="true" to your shortcode:

    [a-z-listing display="terms" taxonomy="category" hide-empty-terms="true"]
    

    Unfortunately I don’t have a solution to your second question :-(.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    Sorry I didn’t get to your message sooner… Yes, multiple short-codes on the same page are problematic. I intend to improve this in the future, but for now you need to make modifications to the template.

    You can copy the template into your theme so that when the plugin updates in the future your changes aren’t overwritten. The template the plugin uses by default is at /wp-content/plugins/a-z-listing/templates/a-z-listing.php, which you should copy to your theme for modifications at /wp-content/themes/$your_theme/a-z-listing.php.

    What permissions did you give to the userid for your database? I believe the minimum required to run the install are select, insert, update, delete, and create. An example GRANT statement is below:

    GRANT select, insert, update, delete, create ON dbname.* TO userid_here@localhost
    
Viewing 15 replies - 166 through 180 (of 927 total)