zedesino
Member
Posted 3 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
zedesino
Member
Posted 3 years ago #
anybody... i need this please.
zedesino
Member
Posted 3 years ago #
i can not believe there is no answer for this.
Guys please how to show empty categories without links.
Thanks
enockma
Member
Posted 3 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.
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
zedesino
Member
Posted 3 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
zedesino
Member
Posted 3 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
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.
zedesino
Member
Posted 3 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