Viewing 12 replies - 1 through 12 (of 12 total)
  • 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.

    Thread Starter joewasia

    (@joewasia)

    Thank you, I think Im getting of this! This works fine for all a-z listing.

    But what if I just want to disable that only for certain pages or certain shortcodes
    e.g I only want to disable that display in the page using the shortcode [a-z-listing display=”posts” taxonomy=”category” terms=”my-term-slug”]

    I’m thinking I have to do custom function on my functions.php
    maybe remove_action or add_filter?

    Sorry i’m not a dev , but if you could point me to which funtion to use, then I can search stackoverflow hehe.

    thank you

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

    Thread Starter joewasia

    (@joewasia)

    Did as your instructions

    the post
    https://belajarwpseo.com/testing/

    the shortcode on the post
    [a-z-listing display=”posts” post-type=”post” taxonomy=”category” terms=”opini”]

    the php file name change to a-z-listing-testing.php and already deleted the lines you mentioed above

    but not working

    maybe im missing something?

    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.

    Thread Starter joewasia

    (@joewasia)

    Already clear cache.
    Seems like it’s not working the way I wanted

    but still big Thanks for your support and amazing plugin!

    Plugin Author Dani Llewellyn

    (@diddledani)

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

    Thread Starter joewasia

    (@joewasia)

    Hi Daniel

    It Works!
    It was just my bad not reading through your doc. I copied the custom php to child theme and works brilliantly!

    Now I just have to figure the CSS,
    because the text is longer, it looks like this
    https://gyazo.com/bc9dd1d25bacab823cb919b6eb1a6936 (is this something to do with the auto 2 column layout?

    and want to put a bullet on the

    • instead.
    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.

    Thread Starter joewasia

    (@joewasia)

    awesome!

    another thing
    how to display post based on Tag?

    tried this but no work
    [a-z-listing display=”posts” post-type=”post” taxonomy=”tag” terms=”serp”]

    and

    I tried to add any az listing shortcode to single custom post types I created with CPT ui but doesn’t show up. But works normal to default single page and single post

    • This reply was modified 4 years, 6 months ago by joewasia.
    Thread Starter joewasia

    (@joewasia)

    Work well but still can’t figured out how to use with post tag

    Paul

    (@anandjose2000)

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

    This worked for me. Thanks excellent plugin.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘remove az letter and’ is closed to new replies.