Skip Navigation

[Resolved] How can I set up a sidebar widget to filter my view based on my Taxonomy?

This thread is resolved. Here is a description of the problem and solution.

Problem:
How can I show a Views Filter in my Website's sidebar?

Solution:
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 chose in the WP Views Filter Widget.

All this process is elaborated in detail here:
https://toolset.com/documentation/user-guides/front-page-filters/
https://toolset.com/documentation/user-guides/front-page-filters/ > Add the search form to a widget

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

Then you follow this instructions to add the View Filter and layout correctly:
https://toolset.com/forums/topic/parametric-search-layouts-and-woocommerce/#post-369192

This support ticket is created 8 years, 1 month ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 10 replies, has 2 voices.

Last updated by tomH-11 8 years ago.

Assisted by: Beda.

Author
Posts
#373227

Hi,

I've got a View that displays my custom type records. The type has a custom Taxonomy (manufacturer) and each post has a manufacturer selected. How do I add a sidebar widget that will list my Taxonomy items (with counts?) such that when I click one of the terms, my view will show only posts with those manufacturers?

I see other questions related to this but nothing that paints the full picture for me so I'm struggling to know how to do this.

Thanks

#373405

Using only Views and a Theme that registered a Sidebar as you need it, 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 chose in the WP Views Filter Widget.

All this process is elaborated in detail here:
https://toolset.com/documentation/user-guides/front-page-filters/
https://toolset.com/documentation/user-guides/front-page-filters/ > Add the search form to a widget

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

Then you follow this instructions to add the View Filter and layout correctly:
https://toolset.com/forums/topic/parametric-search-layouts-and-woocommerce/#post-369192

Please let me know if you have further questions regarding the issue mentioned in this Thread, and let me know if the above solution works for you, I look forward to your reply!

Thank you for your patience.

#379545

Thanks for the response - I apologize for my slow reply.

I've got a filter that works properly but the terms (manufacturers) are shown in a select box with a Submit button. What I want is to have them listed as links (with counts) so that the user can just click on them.

Manufacturer1 (5)
Manufacturer2 (29)
...

I don't see how I would format the filter widget to do that.

[Update: I changed the style from Select to checkbox and I guess that works for me. I'd still like to get the counts next to each Manufacturer however. Is there a way to do that?]

Thanks

#379946
Format of Options.png

Count can be added to parametric Search elements when you insert the Search ShortCodes with the GUI.

If the Count or name parameters are available, you will be able to add them in the GUI (pop up) section "Format of the options:"
(see screenshot)

The Submit Button is MANDATORY on a Widget View or when you display the Results on another page.
There is no workaround for this.

Styling the Views Forms is possible, but having a Link there would conflict with the required Submit Button

Please do not hesitate to open a new thread if other issues or problems arise

Thank you for your patience.

#380029
productCatalogSearchViewFilter.jpg
widgetSetting.jpg
AvadaPageBuilderForProdCatalog.jpg
productCatalog.jpg

Thanks for the help. I now have my counts listed. However, I'm actually more confused now.

As often happens, I've tried various things over the course of getting different views set up for my various types. The thing I just noticed is that the View I'm using in my widget does *not* have a Submit button *and*, the widget is specifying a different View than what is showing in the widget. This is confusing so I'll try to explain carefully.

I'm using the Avada Theme. I'm *not* using Layouts.

I have a widget area called Manufacturer Filter. In that area I have a WP Views Filter widget. The View selected in the Widget is Certification Test Listing. This View *does* have a Submit button and is a view I created for an entirely different Type. The other field in the Widget is Target Page to Show Results and that is set to Product Catalog. On my Product Catalog page I have a shortcode for the view: [wpv-view name="product-catalog-search" view_display="layout"] and I have an Avada Widget element which refers to the widget named Manufacturer Filter.

The View named Product Catalog Search is the one where I've set up the parametric search and fiddled with displaying the name of manufacturer and the counts.

So, I don't understand how this is working the way it is. How is the widget showing the list of Manufacturers when it appears to be set to show Certification Test listings - which is an entirely different set of information? Hopefully the screen shots will help you see what is happening.

#380105

It is weird.

I suggest to delete the View Widget + Landing (result) page ShortCode, and re-add them

Also make sure, the SLUGS of both Views are not accidentally the same (this should NOT happen but perhaps there was a issue while saving it)

If this does not help, can you try to use this without any Page Builders, but instead in a native WordPress page Editor, using another theme and no add on plugins?

If then the issue is still present, it must be due to a corrupted Plugin set and I would recommend a manual reinstall

★ INSTRUCTIONS:

❌ Backup your website and database ❌
• Deactivate/Delete the "Installer" plugin (if you have it)
• Deactivate all Toolset plugins
• Login via FTP to your wp-content/plugins folder
• Delete all Toolset Plugins folders
• Go to https://toolset.com/account/downloads/ and download the latest stable Types Plugin, then extract it.
• Upload the plugin via FTP to the wp-content/plugins folder.
⌥ alternatively you could upload the .zip file using Dashboard > Plugins > New > Upload
• Register the Plugin for your site
⌥ you can do that under Dashboard > Types > Settings > Types Tools > Installer
• Download all other needed Plugins
• Activate them in Dashboard > Plugins
This should not generate any problems.

⌥ In case you want to register Toolset Plugins for your site manually please make sure to enter the naked URL of your site in wp-types.com (something like hidden link)

⌥ In the extreme case, please try to register with all non-Toolset Plugins deactivated,
and Theme Toolset Bootstrap enabled.

If after all this steps, the issue still persist, please provide temporary access (WP-Admin and FTP) to your site
- preferably to a test site where the problem has been replicated if possible -
in order to be of better help and check if some configurations might need to be changed

Your next answer will be private which means only you and I have access to it.

❌ Please backup your database and website ❌

✙ I would, if possible, need access to a site where only a minimal set of Plugins and a default theme is active.
This to avoid eventual compatibility issues with other software.

✙ I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site.
This is also a reason the backup is really important

✙ Please add the Links to:

- The Views Edit Screen

- The Page/Post where you insert the View

- The corresponding Front End Page/Screen

Please don't hesitate to inform me in case the issue persists

Thank you for your patience.

#387150

Before I go through the process of giving you access I have another question.

On my results page, I have the filter in a widget in the sidebar so I use the option to not show the filter with the content by using a shortcode like this on my page:
[wpv-view name="product-catalog-search" view_display="layout"]

This does prevent showing of the filter but it also hides the page navigation controls. I *don't* want to lose those. How do I hide the filter but keep the page nav?

Thanks

#388625

Pagination controls can be added to the Filter HTML section or to the Loop section.

This what you do now shows only the Loop (layout).

So, you must insert pagination to the Loop Section of your views and it will display with the approach you use now.

Make sure to not include the pagination IN the (within the) loop HTML tags but just above or below it.
Otherwise, the pagination will get repeated for each item found and returned by the Loop itself 🙂

Thank you

#390229
example2.jpg
example1.jpg

Thank you. That worked and now I guess I understand that the separate sections in the Views editing page just represent different sections of one big set of markup.

But now I have yet another problem. I wanted to add a second filter to the filter. Initially I had a filter for Manufacturer and I displayed the %%NAME%% and %%COUNT%% using the format attribute as you suggested above. This worked but now that I've added another filter (for Category), the counts for the Manufacturers are showing up as zero.

In the attached screen shot, you can see that the Categories have counts but the Manufacturers don't. I've added another screen shot showing my filter definition.

Am I doing something wrong?

#390477

If it shows (0) it means no content matches that Filter's argument.
No content holds the relevant term or value, or the mix of your search (you search by A and B) is not producing anymore results in that specific 3rd Filter

Anyway, the topic of this Thread here is:
How can I set up a sidebar widget to filter my view based on my Taxonomy?

I assume we solved this.

You have a Sidebar Filter and it is correctly displaying, and showing your Results, is this correct?

We need to analyze other issues or doubts not related to the specific topic of a View in Sidebar, or who to add it there, in another Ticket (One each problem)
https://toolset.com/toolset-support-policy/#support-request-guidelines

Thanks for understanding

#390687

Thanks, I'll open another ticket.

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