Support » Plugins and Hacks » [Resolved] dropdown does not work

[Resolved] dropdown does not work

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


    Try flushing your permalinks. There is a bug in WordPress where you sometimes need to “refresh” the permalink structure to make new custom post types and/or custom taxonomy urls work. I think in your case the redirect isn’t working from the dropdown submit page to the taxonomy page, but the direct link from the list view is working fine.

    To flush the permalinks, go to settings -> permalinks and click save (no need to change any settings). Does that fix it?

    You are right: redirect isn’t working from the dropdown submit page to the taxonomy page, but the direct link from the list view is working fine.

    I tried to do what you said, but it did not work
    Am I doing something wrong?

    It would be a dream come true, if it would work.

    Plugin Author Nick Halsey


    Yes, that’s the correct place to flush permalinks, so that’s not the issue. I can’t get it to work, but perhaps seeing the html would help. Could you put the dropdown somewhere so I can look at what code it’s outputting? The issue is definitely that it doesn’t think the category exists, which is why it 404s instead of going to the homepage…

    I am not really too savvy, could you tell me how and where I can put the dropdown?

    My website is http://www.ctproductsandservices.com and I have the dropdown on http://ctproductsandservices.com/add-a-listing/
    Footer 1
    Hope that is it?

    Plugin Author Nick Halsey


    That’s what I wanted to see. Unfortunately, I’m still having trouble finding the issue. I did find one small bug with the dropdown html code, but I’m pretty sure it won’t fix your issue. I think we can consider it working in your case once http://ctproductsandservices.com/?cat=602 stops going to a 404. I think this isn’t a plugin issue but an issue with something else in your installation.

    It’s possible that there was a WordPress bug in 3.4 that was fixed in 3.5, so it wouldn’t hurt to update (unless you know that you can’t for any reason). If that doesn’t fix it (I doubt it will), then I’m running out of ideas.

    Also, to address your other original question, you can display custom taxonomies on pages by putting some php in your templates, use the wp_dropdown_categories() or wp_list_categories() functions.

    One more try. Is there any chance to have a third choice in the widget. To save it in a list form, like the preview, but that it can be published in a list form. The line spacing should be single.

    Plugin Author Nick Halsey


    Sorry, but I’m not sure what you mean by “preview mode”. By default, the plugin displays the categories as a list, but you can switch to a dropdown if desired. So it should just do what you want if you leave the display as dropdown box unchecked.

    In terms of single vs. double spacing, that’s just something you’d need to change in your theme’s css (styling rules). And columns can also be done with the css (if you don’t care about old IE).

    Plugin Author Nick Halsey


    I found a bug in the dropdown redirect handling that should be resolved in plugin version 3.3, which I just released. Hopefully that solves your original issue.

    Hello! Last night I found this plugin and installed it and I’m getting the exact same problem as yajanssen. The difference is that I’m running WP 3.7. I checked out your changelog and it looks like you fixed this bug for WP 3.6; is there a chance that 3.7 broke it again? At any rate, like I said, this thread describes my experience exactly.

    Plugin Author Nick Halsey


    There are a lot of additional issues with links in the dropdown display mode at the moment; I spend a while trying to get it to work a while ago but haven’t had a chance to revisit it. It’s possible that the issue was re-introduced in WordPress 3.7, as I was probably testing on 3.7 alpha when I tried to resolve it again. Basically, I just need to determine how to get WordPress to redirect from a /?taxonomy=term type url to the actual url, but there is pretty much no documentation in this area. In the meantime, I know that the list display mode works, so you may need to use it instead for now (I know it can take up a lot of space, though).

    hi nick,

    using plugin 3.3 and wp 3.7.1, i also meet the 404 error bug with dropdowns : dropdown form sends me to : http://rafonthenet.net/pgearth/?country=http%3A%2F%2Frafonthenet.net%2Fpgearth%2Fcountry%2Ffr%2F while it should only send to http://rafonthenet.net/pgearth/?country=fr which would point to the right page.

    having a look at the form, it looks like the values for the select options are the full url : “… <option class=”level-1″ value=”http://rafonthenet.net/pgearth/country/fr/”>   France (4)</option>…” and that if should work fine if you only had the taxonomy slug as the value instead of the whole url.
    so i changed line 289 of list-custom-taxonomy-widget.php for :

    $getTax = get_term( $term, $term->taxonomy );
    $taxSlug = $getTax->slug;

    and line 298 for ` $output.= “\t” . ‘<option’ . ‘ class=”‘ . esc_attr( $class_name ) . ‘” value=”‘ . $taxSlug . ‘”>’ . esc_html( $text ) . ‘</option>’ . “\n”;

    as i far as i tested, with %postname% as permalink in my case, this works fine on my install (http://rafonthenet.net/pgearth) for dropdown as well as lists.

    last thing : i m not pro coder, just a leisure occasional php user, so i don’t guarantee this will help you for sure, at least it solved my case..

    thanks for the plugin anyway, will gladly use it and review when the dropdown bug is solved 😉


    Herm71, are you looking to have a list like mine on a separate page http://ctproductsandservices.com/directory-of-members/, or are you set on having a dropdown.

    Plugin Author Nick Halsey


    baignoire, it looks like that’s a step in the right direction, although it still breaks the built-in post_tag taxonomy. I’ll keep exploring it.

    In theory the url site_url]/?[taxonomy]=[term] (which is what that does, of course) should work, but in practice there are some issues. And results may differ based on the current permalinks setting.

    I got it to work by changing

    $output.= "\t" . '<option' . ' class="' . esc_attr( $class_name ) . '" value="' . esc_url( $url ) . '">' . esc_html( $text ) . '</option>' . "\n";


    $output.= "\t" . '<option' . ' class="' . esc_attr( $class_name ) . '" value="' . $term->slug . '">' . esc_html( $text ) . '</option>' . "\n";

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] dropdown does not work’ is closed to new replies.