WordPress.org

Ready to get started?Download WordPress

Forums

List Custom Taxonomy Widget
show parent taxonomy without link? (5 posts)

  1. deepbevel
    Member
    Posted 1 year ago #

    Plugin works great, thanks for the recent update, show hierarchy was exactly what I needed,
    Otherwise, Is it possible to show the parent name without a link if empty?

    thank you

    http://wordpress.org/extend/plugins/list-custom-taxonomy-widget/

  2. Nick Halsey
    Member
    Plugin Author

    Posted 1 year ago #

    Good, thanks.

    As far as I can tell, WordPress doesn't allow this behavior - if I try putting a post in a child category but not the parent, the post isn't listed as being in the parent category but if I visit the parent category page the post's still displayed there.

    The plugin will hide empty categories by default, and I believe do something like you want if the parent's empty for normal categories, but I think wordpress is considering the child categories to count as also being in the parent, if that makes sense.

  3. deepbevel
    Member
    Posted 1 year ago #

    Yes, thanks. I tried to set it up myself, I found some info on it but it was for the regular category taxonomy, not custom taxonomies.

    I tried "collaping categories" plugin. It can show parent categories without a link to the archive.
    However, for some reason it can't find my custom taxonomy, although it says it has that ability. hence, I can't take advantage of it's unlinked parent capability.

    The problem is,in my own useage, on many wp sites, parent categories never have posts, only child categories. It's like a category for other (child) categories. I realize it's not designed to be that way, but that's how I and many others use parent categories. i'd think it would be easier to find a way to do it, other than using a static custom menu.

  4. Nick Halsey
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, that's a valid point. My plugin (and many that have this type of utility) uses the wp_list_categories() function, so if you dig into it there may be specifications for what you're looking to do which I missed. You can very easily modify the parameters calling the function in the plugin's php file, without breaking it's ability to function as a normal widget and saving options, etc. This would also be possible using a customized php loop and get_categories(), which this plugin did previously and it's still in the code in comments. You would just need to add the hierarchy stuff and leave out the links to the parents. Again doing it in the plugin files would allow it to continue functioning as a normal widget with the options provided. Note the different $args that got sent to the customized version.

  5. deepbevel
    Member
    Posted 1 year ago #

    thanks, I'll look into it. lots of new stuff for me but I'll see what I can do.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.