• Resolved webfoundry

    (@webfoundry)


    It looks like you’re checking the full query string in class-beautiful-taxonomy-filters-walker.php to determine whether a given term is selected which works fine unless you have the same term in two or more taxonomies.

    (around line 113)
    if ( in_array( $category->slug, $queryvars, true ) ) {
    $output .= ‘ selected=”selected” ‘;
    }

    It means if I have custom taxonomies of Foreground colour and Background colour, both with white, and I filter Foreground colour on white, both Foreground Colour *and Background Colour end up having white selected. It needs to check the taxonomy name somewhere in this function – not just all $queryvars for the existence of the term.

    If there’s an easy fix it would great to know about

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter webfoundry

    (@webfoundry)

    I think the solution looks something like this instead. It’s definitely a bug so worth similar might work for future versions.

    ` $key=$category->taxonomy;
    if($queryvars[$key]===$category->slug){
    $output .= ‘ selected=”selected” ‘;
    }`

    Plugin Author Jonathandejong

    (@jonathandejong)

    Hi @webfoundry,

    Thank you for finding this 🙂
    I’ll test it and add it to the next version!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Terms selected in wrong (multiple) taxonomy dropdowns’ is closed to new replies.