Skip Navigation

[Gelöst] I want to adda filter as a widget

This support ticket is created vor 7 Jahre, 10 Monate. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 19 Antworten, has 3 Stimmen.

Last updated by BarryS9673 vor 7 Jahre, 10 Monate.

Assisted by: Shane.

Author
Artikel
#404894

I have a standard filter which i have in the main body, however I would like to be able to have a filer appear as a widget, can you expolain how I can get this, I am OK going to widgets and adding a WP View Filter, it is from there where i am lost.

#404899
Capture.PNG

See screenshot, I have managed to add a filter to the side and from what I can figure out this has to have a search button, you can correct me if I am wrong. However the second issue is can I have it that the filter in position "2" does not show on the results page. (The screenshot is the results page)

#404913

Hi,

If I go to this page: "Displaying the Parametric Search Form"
https://toolset.com/documentation/user-guides/front-page-filters/?utm_source=viewsplugin&utm_campaign=views&utm_medium=edit-view-create-parametric-search-helpbox&utm_term=Creating%20parametric%20searches%20with%20Views

It seems to mention that if I remove one bit of code it will then remove those filters I have mentioned, however when i do so the seaecrh actually does not work properly. I have this on my local machine not live.

[wpv-filter-meta-html] --- I remove this
[wpv-layout-meta-html]

#404974

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I think you should go through the following documentation:
https://toolset.com/documentation/user-guides/front-page-filters/
[Section: "Add the search form to a widget"]

I hope that will help you to resolve your issue.

#404976

Hi,

Please refer to this post, I have been using that setup however there appears to be an issue. Please follow the topic.

June 6, 2016 at 10:52 pm

#405032

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

The [wpv-filter-meta-html] shortcode displays the output of the Filter section. The [wpv-layout-meta-html] shortcode displays the output of the Loop Output section. You can add your HTML and fields to rearrange and style the output.

More info:
https://toolset.com/documentation/views-shortcodes/#wpv-filter-meta-html
https://toolset.com/documentation/views-shortcodes/#wpv-layout-meta-html

Could you please share problem URL with steps to reproduce the issue you facing.

#405049

Hi,

It would appear to me that this bit of code shows the filter input items. ( [wpv-filter-meta-html] ) and if I remove this from the Views admin, then what happens is my search filter that I have in the sidebar does not work. The only way I can show you this live is to allow you remote access to see.

#405078

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Using only Views and a Theme that registered a Sidebar, you can use the WP Views Filter Widget which you find in your Appearance > Widgets area in WordPress dashboard.

To use this Widget you need a Post View where you create your parametric Search Filter and add a Submit Button. This View is the one that you will choose in the WP Views Filter Widget.

You can also use Layouts to create a more customized version of your Sidebars and pages. Layouts needs first to be integrated with your Theme:
=> https://toolset.com/documentation/user-guides/layouts-theme-integration/

Then you follow this instruction to add the View Filter and layout correctly. Actually, it NEEDS a theme that is built with Bootstrap or, at least with Foundation.
https://toolset.com/documentation/user-guides/layouts-theme-integration/
https://toolset.com/documentation/user-guides/layouts-getting-started-guide/

I suggest you should create a test site with discover-wp.com and play with our reference sites.
https://toolset.com/faq/how-and-why-to-create-a-test-site-in-discover-wp/

More info:
https://toolset.com/2014/06/learn-build-flexible-parametric-searches/

#405180

Hi,

Perhaps someone else can help me as you seem to be avoiding my question which is really wasting time and causing delays, please either answer my question and if you are not sure, please say so instead of sending me links to references that have nothing to do with my issue.

#405228

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Barry,

Minesh asked me to assist with this issue and i'll be more than happy to lend my help 🙂

So reading your post I gather that you would like have your filters in a widget and the results being displayed in the body area, is this correct?

If you are able to provide me with an example or screenshot of what you are trying to implement then that would be greatly appreciated.

Thanks,
Shane

#405253

Hi Shane, thank you, see my first screenshot of this thread. Now I have managed to place a filter / search within the sidebar, however one appears within the search result page. However I have noticed that there are 2 bits of code when I edit the View for this parametric search.

[wpv-filter-meta-html] >>>> Remove this one
[wpv-layout-meta-html]

When i remove the top one and save, the page does show without the filter elements, however when i do a Search with the one in the sidebar it does not work once that other filter is removed.

#405263

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Barry,

So let me clarify,

The filter is actually needed in order for the search to work. We have an option to allow for the filter alone to be on one page and the results on another page, however the results page will also have the filter on it as well.

So it is essentially not possible to have the results only without the filter at the top.

However there is a way you can manually create the search filters elsewhere as a form and then allow the form to use a GET method so that it passes the values in the url so that the view can be filtered.

This method isn't dynamic, which means that items wont be added to the filters automatically.

Please let me know if this helps.
Thanks,
Shane

#405264

Hi Shane,

I would be happy to try that out and see if it works.

#405343
Capture.PNG

There must be some sort of way to be able to have a filter/search in the sidebar as per my screenshot but also not have those filters appear on the results page.

The reason I say is that the sidebar layout reflects on the results page layout.

#405476

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Barry,

Would you mind providing me with a link to the page?

I have an idea that might work. It involves the use of some css to hide the filters above the results.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.