WordPress.org

Forums

WP Custom Fields Search
Filter Search Items (4 posts)

  1. surferguy17
    Member
    Posted 2 years ago #

    I would really appreciate it if someone could let me know if they've figured out the following...

    I would like to only show options in my drop downs that are available based on selected search items. For example: say I have a book in the category of non-fiction and its style is paperback and I have another book in fiction and its style is hardcover. If I select "non-fiction" in my category drop down, I only want the Paperback option to show in the Style drop down.

    Is there anyway this can be done?

    http://wordpress.org/extend/plugins/wp-custom-fields-search/

  2. peter.grafico
    Member
    Posted 2 years ago #

    i did it, it's not a big deal.
    You got to first create the custom inputs from dashboard - WP custom fields search (one select with category, one with the custom fields "Style").Pubblish it in the sidbar to see the 2 inputs.
    After that you can copy the html using Firebug (for example), to see how the form is created.after that you can paste the code in some page template and insert the javascript code that can do that.

    Do some research to see how to do that, it's something like:
    <select name="cs-all-3" onchange='
    if(this.options[this.selectedIndex].value=="Non fiction") {document.getElementById("sub-select-style").style.display = "block";}'>

    initially the "sub-select-style" select is display:none

  3. wptestert
    Member
    Posted 2 years ago #

    it seems this plugin is working for you,
    on which version of wordpress?

    I am testing it on wordpress 3.1 and it is not working, when I do a search on the custom fields I defined it opens the search result page but finds every single post

  4. wptestert
    Member
    Posted 2 years ago #

    sorry, never mind, it is working now

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Custom Fields Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic