Skip Navigation

[Resolved] Links to filter archives not behaving correctly

This support ticket is created 5 years, 4 months 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by davidS-53 5 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1292249
screencapture-hofmansbuilders-223-165-76-42-sth-nz-wp-admin-admin-php-2019-07-16-14_29_23.png

I have set up filtering by a custom taxonomy for the post type "projects" here: hidden link - you'll note filtering works perfectly fine.

On my homepage here: hidden link , there are three "VIEW PROJECTS" buttons that jump to the projects archive, with filters pre-applied using URL parameters like this: hidden link

If you click one of the homepage links, initially everything is filtered fine. If you click another filter option, it just shows the same options. If you click on the "all" option, it removes all filter options and only displays the option that was clicked initally.

Any idea what's going on here? Cheers!

#1292379
all-values.JPG

Hello,

Please try this, edit the view you mentioned in screenshot:
https://toolset.com/wp-content/uploads/2019/07/1292249-screencapture_hofmansbuilders_223_165_76_42_sth_nz_wp_admin_admin_php_2019_07_16_14_29_23.png

In section "Custom Search Settings", choose option "Let me choose individual settings manually", enable option "Always show all values for inputs", and test again, see screenshot: all-values.JPG

#1293163

Hi Luo, thanks for getting back to me. I have updated the setting and all it has changed is that the filter options don't disappear when clicking "all". It still doesn't update the displayed projects correctly.

#1293283

I have tried the same setting as your screenshot in my localhost with a fresh WordPress installation + the latest version of Toolset plugins, but there isn't similar problem, it works fine.

I suggest you check these in your website:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP/JS code snippets, and test again

2) If the problem still persists, please provide database dump file(ZIP file) of your website, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1294295

Thanks for the details, I am downloading the files, will update here if there is anything found.

#1294303

Here are what I found:
The URL parameter "project-type" is the slug of custom taxonomy "Project Types", so it is reserved, you can not use it as URL parameter name of custom search form.

So you just need to change the URL search parameter name to something else, for example: wpv-project-type
Please try these:
1) Edit the WordPress archive "Projects"
hidden link
in section "Query Filter", change the filter as below:
Select posts with taxonomy:
Project Types slug in one of those set by the URL parameter wpv-project-type
eg. hidden link

2) In section "Search and Pagination", change the codes as below:

...
Filter by: [wpv-control-post-taxonomy taxonomy="project-type" type="radios" default_label="All" format="%%NAME%% (%%COUNT%%)" url_param="wpv-project-type"]
...

And test again

#1297119

Perfect, yeah that was it. Sorted!