WordPress.org

Ready to get started?Download WordPress

Forums

wp_dropdown_categories - is this possible? (2 posts)

  1. wedideas
    Member
    Posted 1 year ago #

    Hello,

    I'm looking at using the wp_dropdown_categories to provide a list of categories for a user to access, but I'm having trouble getting the slug as the value to output to the browser properly.

    I've could use the javascript only version on the wordpress site (http://codex.wordpress.org/Function_Reference/wp_dropdown_categories) but there's no fallback so if a user has js off the list won't work :-(

    On submit, I would like the form to go to the following…

    http://www.example.com/directory/slug-here

    At the moment i'm getting…

    http://www.example.com/directory/?cat=slug-here

    Is there a way to do this in php or am I barking up the wrong tree?

    Thanks,

    James

  2. HaneD
    Member
    Posted 1 year ago #

    Dont know if this will help but check out my question and the solution that I found. It was for custom taxonomies but I think you would be able to get it to work with categories.

    My final working code can be found here

Topic Closed

This topic has been closed to new replies.

About this Topic