WordPress.org

Ready to get started?Download WordPress

Forums

Lift: Search for WordPress
[resolved] Example of lift_filters_default_fields (8 posts)

  1. bswen
    Member
    Posted 1 year ago #

    Can you provide an example for how I might use lift_filters_default_fields?

    Can I use it to present category and/or tag filtering options to the user?

    Thanks again!

    Brady

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

  2. prettyboymp
    Member
    Plugin Author

    Posted 1 year ago #

    The filter is used to limit which facets/filters/order by options to show to a user by default. Currently, the plugin only handles the following default search filters: 'date', 'post_type', 'post_categories', 'post_tags', 'orderby'.

    You can see an example of how the filter can be used to remove one of these default fields here in the constructor of the Lift_Search_Form class, though I'm still looking into why we're filtering out the tags and category filters by default: https://github.com/voceconnect/lift-search/blob/master/wp/lift-search-form.php#L37

  3. hyperdo
    Member
    Posted 1 year ago #

    I would like the author and category as a filter. How do I do that?

  4. prettyboymp
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Hyperdo,

    We're actually in the midst of reworking the search form filters to simplify integration. Since we're currently in the middle of it, the ability to add you own is somewhat limited at the moment. Look for it to be included in release 1.6.

  5. hyperdo
    Member
    Posted 1 year ago #

    Thanks. When do you think you will have it ready?

  6. hyperdo
    Member
    Posted 1 year ago #

    If you could just let me know when the release will be, let me know. Thanks!

  7. prettyboymp
    Member
    Plugin Author

    Posted 1 year ago #

    I've released a new version of Lift with classes setup to simplify adding new fields and controls to the search form. I'll try to get some documentation on them on the site soon. In the meantime, you can look at how the core fields are added within the code as examples: https://github.com/voceconnect/lift-search/blob/master/wp/field.php#L564

  8. Kevin Langley
    Member
    Plugin Author

    Posted 9 months ago #

    Marking as resolved since this was included in version 1.6.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.