Forum Replies Created

Viewing 15 replies - 601 through 615 (of 927 total)
  • Plugin Author Dani Llewellyn

    (@diddledani)

    It’s not possible in the released version to exclude a page using the shortcode.

    To add pages that begin with a dot as a separate group you need to customise the alphabet. This is done with the shortcode attribute alphabet which needs a very precise configuration. By default the config is:

    AÁÀÄÂaáàäâ,Bb,Cc,Dd,EÉÈËÊeéèëê,Ff,Gg,Hh,IÍÌÏÎiíìïî,Jj,Kk,Ll,Mm,Nn,OÓÒÖÔoóòöô,Pp,Qq,Rr,Ssß,Tt,UÚÙÜÛuúùüû,Vv,Ww,Xx,Yy,Zz
    

    To add the dot as a new section on the end after Z you can use:

    [a-z-listing alphabet="AÁÀÄÂaáàäâ,Bb,Cc,Dd,EÉÈËÊeéèëê,Ff,Gg,Hh,IÍÌÏÎiíìïî,Jj,Kk,Ll,Mm,Nn,OÓÒÖÔoóòöô,Pp,Qq,Rr,Ssß,Tt,UÚÙÜÛuúùüû,Vv,Ww,Xx,Yy,Zz,."]
    

    The only characters you cannot use is the comma ,, because I have designated that character to separate the groups from each other, and the quote " because that is used to wrap the entire configuration.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Sorry I missed your post.

    Are you relying on the automatic section targeting? If so, the confusing part is that the A-Z Listing cannot be on the same page that acts as the section parent. Instead the A-Z Listing must also be a child of the section parent otherwise it cannot know that it is to display the children.

    So if you have a page layout like:

    home
    services
    products

    Then, if you want to list pages under services you need the A-Z Listing shortcode to be on a page directly underneath services:

    home
    services
    - A-Z Listing
    products

    The vapourware that is my in-development version 2.0.0 will include more configuration to allow for actually specifying this more declaratively instead of relying on “magic”.

    Hope this helps.

    Thread Starter Dani Llewellyn

    (@diddledani)

    OK, I’ve replicated your setup and now my cookies are not in the response every time. Much better. Thanks for the tip on WP-Rocket!

    Thread Starter Dani Llewellyn

    (@diddledani)

    Well that’s intriguing.

    You are quite right, except also not. Your site is only issuing the cookies in the response when they’re not in the request. Mine is issuing them both when they’re in the request and not in the request. Perhaps that’s a Cloudflare or WPRocket thing that is stripping them from the response then. This is curious.

    Thread Starter Dani Llewellyn

    (@diddledani)

    Hi, my mention of your site being different was to point out that for example your homepage is not setting any cookies despite the site running the same plugin that is, on my site, setting cookies on the homepage.

    Like your site, my site does not include the login form or ticket related things on the homepage, so I’m at a loss as to explain how your site is differing in behaviour. Your site is NOT setting cookies on non-ticket pages. My site IS setting cookies on non-ticket pages. This discrepency is what I don’t understand.

    Have you got any configuration that prevents the cookies being set? If you haven’t then what is different about my site that I’m getting cookies set on every request where you are not?

    Plugin Author Dani Llewellyn

    (@diddledani)

    The widget in the latest release of the plugin cannot be configured beyond the limited options presented in the UI. Version 2.0, which I keep promising people that I’ll get finished but haven’t done so yet, will include more comprehensive configuration of the widget including being able to choose between types other than pages and taxonomies.

    Plugin Author Dani Llewellyn

    (@diddledani)

    I really don’t think this is possible easily. The plugin just isn’t designed to do what you want. You might be able to adapt the template to achieve this by copying it out of the templates directory (in the plugin folder) to your theme making sure to name it a-z-listing.php and adapting it.

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

    (@diddledani)

    You’ve added the filter as an action hook. Change add_action() to add_filter().

    You also need to specify that your function receives three variables:

    add_filter( 'a_z_listing_item_indices', 'exclude_a_z_pages', 10, 3 );
    
    Plugin Author Dani Llewellyn

    (@diddledani)

    It looks like those three letter categories (Æ, Å, and Ø) are included in your output now. Have you got it working how you wanted it or is there still a problem?

    Plugin Author Dani Llewellyn

    (@diddledani)

    I think I know what is causing this and will try to get it fixed in a new version which I hope to release soon. The version number to look for is 2.0.

    Plugin Author Dani Llewellyn

    (@diddledani)

    This currently isn’t possible, but will be in the next version which I hope to get released very soon. Once 2.0 is out, you will be able to add a parent-term attribute to your shortcode:

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

    This will show all descendants including grand-children and below (child-of-child-of…) artists.

    Plugin Author Dani Llewellyn

    (@diddledani)

    It’s not currently possible to list users with this plugin.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Yes, this is possible but you need to add some PHP code into your theme to achieve it. Place something similar to the second block of code below into your theme’s functions.php file (if it doesn’t have such a file you can create it at wp-content/themes/<your-theme>/functions.php with the first snippet below, to which you can add the second code block as you would if the file already existed:

    <?php
    
    add_action( 'a_z_listing_item_indices', 'exclude_a_z_pages' );
    function exclude_a_z_pages( $indices, $item, $type ) {
        if ( in_array( $item->ID, array(
            5, // exclude post with ID of '5'
            6, // exclude post with ID of '6'
            7, // exclude post with ID of '7'
            // add further ID numbers here separated by commas (,) to exclude them
        ) ) {
            $indices = array();
        }
    
        return $indices;
    }
    

    The second code block needs to be either after <?php, and before ?> if it is present. This is a rule of how the PHP engine recognises that the code is PHP rather than HTML.

    • This reply was modified 7 years, 10 months ago by Dani Llewellyn. Reason: add info about tags
    Plugin Author Dani Llewellyn

    (@diddledani)

    This might be possible by using the alphabet="" parameter in the shortcode:

    [a-z-listing alphabet="Aa,Bb,Cc,Dd,Ee,Ff,Gg,Hh,Ii,Jj,Kk,Ll,Mm,Nn,Oo,Pp,Qq,Rr,Ss,Tt,Uu,Vv,Ww,Xx,Yy,Zz,."]
    

    The default alphabet setting is:

    AÁÀÄÂaáàäâ,Bb,Cc,Dd,EÉÈËÊeéèëê,Ff,Gg,Hh,IÍÌÏÎiíìïî,Jj,Kk,Ll,Mm,Nn,OÓÒÖÔoóòöô,Pp,Qq,Rr,Ssß,Tt,UÚÙÜÛuúùüû,Vv,Ww,Xx,Yy,Zz
    

    You can add any character except the comma , because that is used to separate each group. Multiple characters may be included in a single group as shown by the vowels above which have several more variants in their groups than the consonants. So if you want the $ and % to be grouped with the . then you can do:

    Aa,Bb,Cc,Dd,Ee,Ff,Gg,Hh,Ii,Jj,Kk,Ll,Mm,Nn,Oo,Pp,Qq,Rr,Ss,Tt,Uu,Vv,Ww,Xx,Yy,Zz,.$%

    The first character in each group is used as the title of that group. By default the first character and therefore the title for each group as defined by the list above is the upper-case unaccented letter e.g. A, B, C, etc. If I rearranged the groups to put the lower-case unaccented letter first in each group then their titles will change to the lower-case unaccented letter. I hope I’ve explained that well enough for you to see how it works, because it is a complex mechanism that I really need to improve somehow.

    Plugin Author Dani Llewellyn

    (@diddledani)

    I’ve been looking over WordPress docs, and I think I can commit to including filtering in a future update, but for now it’s not possible 🙁 sorry.

Viewing 15 replies - 601 through 615 (of 927 total)