WordPress.org

Ready to get started?Download WordPress

Forums

Faceted Search
Dropdown List Instead o Checkboxes (12 posts)

  1. mark7694
    Member
    Posted 3 years ago #

    I've been trying everything to change the checkboxes to dropdown lists. Mostly because I am using this for mobile and mobile phones read lists much better and provide a better UI. I thought it would be an easy fix just by changing the input type but that doesn't seem to work. Is this possible?

    http://wordpress.org/extend/plugins/faceted-search/

  2. AndrewUlrich
    Member
    Plugin Author

    Posted 3 years ago #

    Since it's hierarchical, and dropdownlists are not, this might be kind of hard. You may want to see if you can use some code from the Hierarchical Select Drupal Module.

  3. mark7694
    Member
    Posted 3 years ago #

    Thanks for the quick response. I have it set up like this right now http://www.dmngoodtimes.com and that works perfect. I love the ability I have to customize it. I've been able to re-code it to use dropdown lists and the interface works fine on mobile. However, it returns only one tag chosen even if there are multiple tags selected. Is that just because tags do not have the ability to do this? I know taxonomies can do this but I would have to re-tag almost 300 posts in order to use taxonomies over tags which is why your plugin is so useful right now.

  4. AndrewUlrich
    Member
    Plugin Author

    Posted 3 years ago #

    Looking good, man!

    I think I know what you're saying. It won't return anything if you select, say, both 14th Street and H street because there are no posts tagged with both of those. It will only return results if you select only one of those. However, if you select both Downtown and American, you'll find something because there are posts tagged with both of these.

    I think what you want is the option to broaden the results rather than narrow them, so that if you select both 14th and H Street, you'll find posts at either location, rather than posts that are only at both locations. This is a much requested feature, and I plan to look into it tonight, though if I can't finish it tonight, it may have to wait a week or so 'cause I've got a different task to do this weekend.

  5. AndrewUlrich
    Member
    Plugin Author

    Posted 3 years ago #

    Hey good news:

    I just released version 3.0, and it allows you to choose from three different search modes. For your site, I recommend the new 'Smart' search mode, which will allow people to choose, say, both 14th Street and H Street, and Burgers, and will return restaurants at either location that serve burgers. To get that set up, you'll have to put your tags as subcategories to location, food, and vibe parent categories. Let me know if you need help disabling those parent categories so that they don't show up as selectable options.

  6. mark7694
    Member
    Posted 3 years ago #

    Thanks, Andrew. Question: Can tags have sub-tags? I thought they were not hierarchical.

    Currently on my site those categories (Vibe, Location, etc.) aren't real. All of the tags are on the same level. From a visual standpoint I just broke them up so that it was easier for the user to visualize. Those top-level labels are just static.

  7. AndrewUlrich
    Member
    Plugin Author

    Posted 3 years ago #

    Tags aren't hierarchical, but categories are. Both of these data types are stored in a similar fashion, so it should be pretty easy to convert them to each other. Just googling it, I found the following link that apparently has instructions on how to do this:
    http://www.bhagwad.com/blog/2009/technology/converting-wordpress-tags-into-categories.html

    Yes, you'll need to create those Vibe, Location, etc. categories. There should be an easy way to put all your newly-converted categories under these. You could try one of many bulk category plugins, or just do it the old fashioned way.

  8. Blahtor
    Member
    Posted 3 years ago #

    Hey mark7694, your customization of this widget is cool.
    I want to make mine look like that too - neat tables instead of messy tree structures.
    What should I do to the plugin's code to get that look? (I am a complete copy/paste newbie)
    Thanks!

  9. mark7694
    Member
    Posted 3 years ago #

    Thanks, Blahtor. I kind of hacked it so it's not really a simple cut and paste job. If you have the widget on the sidebar all you need to do is view the source you can see the values for all of your checkboxes, form call, etc. So what you are seeing on my site is no longer the widget. It's the code from the widget that I pasted into my template file. I just coded a table like you said and placed the code from the form and the checkboxes where I wanted. You can view the source on dmngoodtimes.com and see how I did it.

    As far as styling the checkboxes- that's a bit more challenging. You'll need to use jquery. I used CUSTOM FORM ELEMENTS, created by Ryan Fait http://www.ryanfait.com. That allows you to ovveride the default checkbox styles.

  10. Blahtor
    Member
    Posted 3 years ago #

    ^ Thanks, I don't really need to style the checkboxes - they are OK the way they are.
    I only need to make the whole tree thing a little bit more neat looking.
    I will also need to somehow do a few font tweaks (color, bold/italic, etc).

    Should I view the stylesheet.css on http://www.dmngoodtimes.com to be able to understand what you did?
    I'm really, really new to this game.

    BTW, does your setup allow for automatic table row creation every time you create a new category?

  11. mark7694
    Member
    Posted 3 years ago #

    You should just be able to view the source of the page. It's not the CSS that drives it. However, the setup is static. It does not add for automatic table row creation. If you create a new TAG or CATEGORY you will need go in to the HTML and add it manually which is why I wouldn't suggest going that route.

    Alternatively, you may want to check out the taxonomy drill-down plugin. It utilizes custom post types and taxonomies which is what you should be using. TAGS and CATEGORIES are the old way of organizing content via WordPress for this type of action.

  12. tesse_k
    Member
    Posted 3 years ago #

    mark7694:

    Hi, I have a small request regarding your wicked customization of the Faceted Search. Can I perhaps get your email or something - am really interested in some assistance from a guy who seems to know what he's doing with this plugin :)

    If help is provided, it will surely be compensated.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic