• Resolved Allen Chu

    (@allensph)


    Greetings,

    I found the developer docs about the filter: advanced_sidebar_menu_taxonomy

    The Code Example changed taxonomy to another one.
    But how to make it support on multiple taxonomies ?
    Thank you.

    • This topic was modified 7 years, 7 months ago by Allen Chu.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Allen Chu

    (@allensph)

    And I think it’s better to detect current taxonomy type and generate $taxonomy value dynamically, instead of manually change it. But these behavior may not fit the plugin structure and not easy for me to achieve. Need some help here. Thanks.

    Thread Starter Allen Chu

    (@allensph)

    I’ve tried and make something available for my scenario:
    Create a parent level term above others in My Custom Taxonomy.
    Use taxonomy-term instead of custom-post-type-archive in Menu,
    and works fine (even with several different taxonomies).

    function custom_taxonomy( $taxonomy, $widget_args, $widget_values, $menu_class){
        global $post;
        $taxonomy_names = get_object_taxonomies( $post );
        $taxonomy = $taxonomy_names[0];
        return $taxonomy;
    }
    add_action('advanced_sidebar_menu_taxonomy','custom_taxonomy', 10, 4);
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple Custom Taxonomies ?’ is closed to new replies.