• Resolved screenbeetle

    (@screenbeetle)


    Hi Nick.

    It looks like you’ve touched on what I need in another thread (was 9months old now so have been asked to post afresh).

    Would you be able to elaborate a little on how the wp_list_categories() function can be used with your plugin?

    My Situation:
    I have several hierarchical custom taxonomies – each parent with a number of children. I am using the same sidebar and widget for all taxonomy pages and would like the widget to detect which parent the user has landed on and only show that taxonomies children.

    As far as I understand:
    You widget can do this but do I need to hack the core files or can it be done through the widget settings? I know some widgets allow wp queries to be entered into the settings fields.

    Thanks in advance
    Peter

    https://www.ads-software.com/plugins/list-custom-taxonomy-widget/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nick Halsey

    (@celloexpressions)

    This plugin is just a simple wrapper that provide a UI for some of the options in the wp_list_categories() function. If you need to use wp_list_categories() in a widget with more custom options and are unsure where to start, I’d recommend forking an early version of this plugin (anything up to 3.1.1 – before the dropdown mess was added) and adding any additional features you need to get it working. This plugin ended up with a bunch of the options that that function has, but for most use-cases creating a simple custom widget is easiest.

    In your case you’ll want to add some conditional logic that looks at what the current page is displaying to adapt the widget accordingly. The plugin could do this if you manually created a separate one for each parent and showed the widgets conditionally, but a custom, automated appriach would be better.

    Thread Starter screenbeetle

    (@screenbeetle)

    Thank you Nick.

    I wrote my own sidebar into the theme this time but will definitely consider forking the next time I need something similar.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dedect current parent taxonomy and list children’ is closed to new replies.