• hanxa

    (@hanxa)


    Is it possible to ignore articles at the start of the post title? Sorting posts and have a lot that begin with “The” – it would be far more beneficial to sort these, ignoring the “the” (so “The Watchtower of Arath” would display under “W”)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter hanxa

    (@hanxa)

    Also, slightly unrelated, is it possible to only show posts with a certain tag or exclude a certain tag? (I want to only include posts with the “cortex” tag. Alternatively, I can exclude the “updates” and “notes” tags.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    Ignoring articles like “A”, “An”, “The” etc. is possible but will require some custom coding to implement. There is a filter which you can hook called a_z_listing_item_index_letter. You will need to create a function that returns the appropriate letter(s) for a post or term according to your own rules. The returned value must be an array of letters.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Excluding posts with a specific term applied is doable with the exclude-terms and taxonomy parameters to the shortcode:

    [a-z-listing display="posts" post-type="post" taxonomy="category" exclude-terms="category-to-exclude"]
    

    The exclude-terms parameter takes a list of terms’ slugs to exclude posts which are assigned the terms. The list is separated by commas ,.

    In the documentation this filter hook is marked as deprecated. Is this simply because its name is to be changed, or will it disappear altogether?

    Plugin Author Dani Llewellyn

    (@diddledani)

    @pcgardner please start a new topic. However, for completeness, the filter I mentioned, and linked to documentation of, above is not deprecated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Ignore articles (A, An, The)’ is closed to new replies.