WordPress.org

Forums

Showing empty categories without link (9 posts)

  1. zedesino
    Member
    Posted 6 years ago #

    Hello,
    i'm new with wordpress, and my first wp website is here.
    i have one small problem, on this page i'm using plugin to list categories. Plugin dont support showing empty categories, but i fixed in core files of wordpress.
    Question is:
    Is there any way to modify category template or link template to showing empty categories without link. Right now if you click on some empty category you get "Sorry, we currently do not have any inventory for this artist." but ideal will be to have without links so in that case i can customize color of empty categories and separate them like here.
    I was searching for days around but i did not find the answer
    Thanks

  2. zedesino
    Member
    Posted 6 years ago #

    anybody... i need this please.

  3. zedesino
    Member
    Posted 6 years ago #

    i can not believe there is no answer for this.
    Guys please how to show empty categories without links.

    Thanks

  4. enockma
    Member
    Posted 6 years ago #

    hi,

    i have a similar problem. i would like to show a complete list of all categories, including empty categories. but so we do not waste the users time clicking on empty links, i would like the empty categories to not clickable links.

    if any one has similar issue or knows how to do this, please let me know.

    thanks in advance.

  5. Chris_K
    Member
    Posted 6 years ago #

    Check the documentation for wp_list_categories. Default is to hide empty categories, but you can toggle that. You can also toggle on "show count" to at least show (0) by empty cats.

    Not quite what you're after, but perhaps a start?

    More Category related template tags can be found here: http://codex.wordpress.org/Template_Tags#Category_tags

  6. zedesino
    Member
    Posted 6 years ago #

    Hello HandySolo,
    i know about that but there is a problem with plugin. DDMultiColCats plugin doesnt support shwing count next to categories, so i have two options:
    - to turn-off links for empty categories in core of wordpress or
    - to make custom template to show categories as this plugin shows

    i tryed to tweak plugin but doesnt work.

    thanks anyway

  7. zedesino
    Member
    Posted 6 years ago #

    i will ask one more time, how to turn of link for empty categories in wordpress. I mean in core of wordpress what to change to get empty categories without link.

    Please, thanks

  8. Chris_K
    Member
    Posted 6 years ago #

    Modifying core files is just not going to put you in a happy place after you do a few WP upgrades and forget your changes.

    I already gave links to the WP category tag functions. Now you just need to see which one your plugin is calling and adjust that tag call in the plugin's code accordingly.

  9. zedesino
    Member
    Posted 6 years ago #

    you are right Handysolo for update, but
    i spent days and days of tweaking and did not find how to fix this thru plugin. I will try more.

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic