• Hi, I need to have to select drop downs, the first one is a category (taxonomy I use for my custom post type) and the other one is all posts (custom post type) in that category. So the other one must be dynamic and change when the category changes, than I need a button that takes me to that choosen post. Is it possible to and how to do that? Does anyone did it before and can give me som advise?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    This is done using AJAX techniques, though the ‘X’ part (XML) is not strictly required. The javascript onchange event of the first dropdown sends a request to your server with the selection value. The server uses this value to do a category query for posts and constructs some sort of structured response. It could be the complete option list HTML, or an array of titles that javascript uses to build the option list. The array could be any structure you like, CDF, JSON, and even XML.

    The second selection then causes a standard GET request to be sent for the selected post.

    There are many tutorials on AJAX to be found, but be aware that WP requires a few quirks that are not found in generic AJAX tutorials, so look for WP specific AJAX.

    Thread Starter maxj

    (@maxj)

    Thank You @bcworkz I will check it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dropdowns with category and post’ is closed to new replies.