• PLEASE HELP. URGENT! :\

    Hi Everyone,
    I have searched far and wide for a way to list CATEGORY titles (not post titles) by first letter, not a full list in alphabetic order but… a list that only displays category titles that start with “d” or whatever the desired letter.

    If you are curious of the usage, I am making an A B C D etc. nav and need it to list category titles that start with the respective letter.

    I have already found nateomedia’s plugin and it is for post so it wont work. I need category titles. Perhaps the bulk of the work is done with his plugin? i don’t know enough about php to say but i would think you could query the data base for category title instead of post title. but I dont know and that why i am here.

    Any help would be greatly appreciated because I am under a tight deadline here! Yikes!

Viewing 9 replies - 16 through 24 (of 24 total)
  • Anyone with a list of categories like

    Bangkok
    Borat
    Bunghole

    deserves all the help they can get on this. :)

    *laughing* Heh…. I wasn’t going to post, Kafkaesquí…. I was biting my tongue….

    Thread Starter thedesigncoalition

    (@thedesigncoalition)

    Ha!! Not really my categories. But yeah there is something wrong with me if those are the first “B” words that come to mind.

    Ok, I’ve put together a plugin:

    Alpha list_cats
    Download plugin | View source

    Usage:
    Once the plugin is uploaded and activated, the following two ‘template tag’ functions are available:

    <?php alpha_list_cats(); ?>
    Analogous to list_cats()

    <?php szub_alpha_list_cats(); ?>
    Analogous to wp_list_cats()

    The parameter list for list_cats() is the same for alpha_list_cats(), only a new final 19th (!) parameter has been added: first_char.

    Example of the new parameter used with szub_alpha_list_cats():

    <?php szub_alpha_list_cats('first_char=a'); ?>

    The value for first_char is case insensitive, so ‘a’ and ‘A’ are equivalent.

    Keep in mind this will not build an alpha-delimited nesting of all categories in one stroke, so for a complete A-Z list one must provide instances of alpha_list_cats (or, szub_alpha_list_cats) for each letter; but then this *is* PHP, so that sort of thing can be automated.

    Also, the bulk of the code is list_cats dropped into the plugin. I just did some modifyin’.

    HAH! Cool…. Kafkaesquí proves once again that he can rise to the occasion….

    So I’m downloading it to my “kaf” folder in my “plugins” folder…. I may never need it, but eventually someone will and won’t be able to find it or whatever…. It’s a collectable “kaf”!

    Thread Starter thedesigncoalition

    (@thedesigncoalition)

    Kaf you are a god

    Thread Starter thedesigncoalition

    (@thedesigncoalition)

    Works like a dream! I’ll send you a link when it goes live Kaf

    Thank you, Kafka, it works like hell!

    My Brand Library: https://wonderland.creative-assets.com/marken/

    Thread Starter thedesigncoalition

    (@thedesigncoalition)

    Hey kaf , the site is still lacking content but you can see my usage here:

    https://quintessentialdisc.com/

    click on the “find an artist” button and you will see my alphabetical menu.

    Thanks Again!!!

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘wp_list_cats by Alphabet? (ex. only category titles that start with “A”)’ is closed to new replies.