Forum Replies Created

Viewing 15 replies - 406 through 420 (of 927 total)
  • Forum: Plugins
    In reply to: [A-Z Listing] page styling
    Plugin Author Dani Llewellyn

    (@diddledani)

    That’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.

    Plugin Author Dani Llewellyn

    (@diddledani)

    in fact, I immediately see a mistake in my code – the third line has:

      if ( $type !== 'posts' ) {
    

    but it should read:

      if ( $type !== 'product' ) {
    
    Plugin Author Dani Llewellyn

    (@diddledani)

    I’ll try to find some time to experiment to see if I can work out a solution for you 🙂

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    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"]
    
    Plugin Author Dani Llewellyn

    (@diddledani)

    The output you describe cannot be achieved with my plugin. It only supports separating items by a single character (alphabetical letter).

    Plugin Author Dani Llewellyn

    (@diddledani)

    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.php into 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;
    
    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    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).

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    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.php file 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.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Awesome. I’m glad we figured it out together 🙂

    Plugin Author Dani Llewellyn

    (@diddledani)

    It 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.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Would 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 styling
    Plugin Author Dani Llewellyn

    (@diddledani)

    This 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.php file:

    add_action( 'init', 'a_z_listing_force_enable_styles', 99 );
    
    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    To add images to the output you need to copy the template from wp-content/plugins/a-z-listing/templates/a-z-listing.php into your theme’s folder alongside functions.php and 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.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Alternatively 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.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    You need to modify both the column-width in the top selector and the max-width in each of the max-x-columns selectors. If you want to ensure that you never have more than two columns, then once you’ve set the column-width you can set all the selectors for max-x-columns where x is greater than 2 to have the same max-width setting.

    For example, if you want to have columns 25em wide instead of the default 15em and 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;
    }
Viewing 15 replies - 406 through 420 (of 927 total)