• Resolved r78o1k

    (@r78o1k)


    Hi. I am very new at this… I have added the search & filter function to my home page, but it has duplicated a couple of my categories and the submit button doesn’t do anything?

    I only want to have the search for categories. My website is http://www.mumswholovebrunch.com

    This is the code I have used:
    <?php echo do_shortcode(‘[searchandfilter fields=”search,category,post_tag” types=”,checkbox,checkbox” headings=”,Categories”]’);?>

    Thanks very much

    https://ww.wp.xz.cn/plugins/search-filter/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ross Morsali

    (@designsandcode)

    Hey there, it looks like you are using the shortcode within a post, which means you do not need to use the php tags, instead use:

    [searchandfilter fields="search,category,post_tag" types=",checkbox,checkbox" headings=",Categories"]

    Use this code and check again 🙂

    Thread Starter r78o1k

    (@r78o1k)

    Great thanks that has worked! That was so fast!! I am putting the code into a post. Can I put it into a widget and have it in one of the headers? If so How?

    Also, if I want to do a search for more than one category, I want the result to only bring up posts with both those categories.
    currently if I search for breakfast and chairs, the result will bring up all posts with breakfast and/or all with chairs. But I the result to only bring up posts with Both breakfast And chairs.

    Plugin Author Ross Morsali

    (@designsandcode)

    Hey r78o1k, yeah you can.

    To put it in a widget, just create a text widget, and use the shortcode like in the example I just gave you and the search form will appear in a widget.

    If you want to include it in one of your headers then you’ll have to use the first shortcode that you used, with the php tags – but you’ll have to go in and edit your theme files to figure out where to place it.

    To use operators use it like:

    [searchandfilter fields="search,category,post_tag" types=",checkbox,checkbox" headings=",Categories" operators=",and"]

    But the widget by default is using “and” already, the other value can be “or”.

    I just did a test search for “all day breakfast” and “change table” which took me to this url:
    http://www.mumswholovebrunch.com/category/all-day-breakfast+change-table/

    If you can see, it is already using the “and” operator!

    Check out the docs for more info and if you like the plugin please leave us a rating! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘submit button not working’ is closed to new replies.