Skip Navigation

[Resolved] Showing search results for a custom taxanomy

This support ticket is created 7 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.

Our next available supporter will start replying to tickets in about 5.03 hours from now. Thank you for your understanding.

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)

Tagged: 

This topic contains 18 replies, has 2 voices.

Last updated by joshJ-2 7 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#580949

Tell us what you are trying to do?
I want to use a shortcode on a page to display all all results from a specific taxanomy i.e. flooring, plumbing etc

Is there any documentation that you are following?
I have tried using [wpv-view name="search" wpvcategory="Flooring"] and I have tried using [wpv-view name="search" Service="Flooring"]

Is there a similar example that we can see?
Here is the page with all search functionality that we have successfully created:
hidden link

#580970

Dear Josh,

Yes, it is possible to pass parameter to Views with shortcode attribute, here are the documents:
1) You need to setup a filter based on the shortcode attribute:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
Value set by View shortcode attribute

2) Then setup the Views shortcode, and pass parameter with shortcode attributes:
https://toolset.com/documentation/user-guides/passing-arguments-to-views/
section "Controlling the filter with shortcode attributes"

#580972
query-missing.jpg

I have done it that way for other projects but it doesn't seem like it can be done for a search. There is no 'Query Filter' options for a search.

#580975

Please click link "Screen options", enable option "Query Filter", and test again

#581312
toolset.jpg

I have enabled this now, thanks. We have set this up but still the following shortcode doesn't work

[wpv-view name="view-name" service="cleaning"]

#581352

Please check these:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide a test site with the same problem, and fill below private detail box with login details, also point out the problem page URL and view URL, I need to test and debug it in a live website. thanks

#581459

Since you did not point out the problem page and view URL, so I assume we are talking about the view "Products", and I have done below modification in your website:
1) deactivate plugin "Password Protected", to test the result in your website
2) Create a page with below codes:
hidden link

Carry Bags:
[wpv-view name="Products" wpvcategory="Carry Bags"]

<hr />
Cellophane Rolls:
[wpv-view name="Products" wpvcategory="Cellophane Rolls"]

Test above page in front-end:
hidden link
It works fine, please check if it is what you want.

#581695

Sorry it like I sent you the details for the wrong website. Can you please resend that form?

#581797

Thanks for the details, I just checked the website you mentioned in post:
https://toolset.com/forums/topic/showing-search-results-for-a-custom-taxanomy/#post-581424

For example this page:
hidden link
using below shortcodes:

[wpv-view name="Products" wpvcategory="Carry Bags"]

And it does work fine in front-end, see the result here: there are 6 items in the result
hidden link

Is this problem resolved? if you still need assistance for it, please point out where and how can I see the problem in your website, thanks

#582156

Are you serious? Yes it works fine on the jazzbags website but that is not the website we are currently working on. This was another site we previously built and are using that as an example

This is the website and an example of a problem page
hidden link

#582202

There is a misunderstand, the website you talking about:
hidden link
Which is different from the original website:
https://toolset.com/forums/topic/showing-search-results-for-a-custom-taxanomy/#post-581424

For the new website, please check these:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, also point out the problem page URL and View URL, I need to test and debug it in my localhost, thanks

#582241

I have done below modification in your website:
1)Edit the view "search":
hidden link
in section "Query Filter", remove the taxonomy filter:
Select posts with taxonomy:
Categories in one of these:
It will return no posts in the result

2) Modify the post "Cleaning Services"
hidden link
In section "Content Template", choose option "None"
It will be able to output the post content directly.

Please test again, check if it is fixed or not. thanks

#582275

Sorry but I can;t follow that. I tried using the same shortcode for ht other pages but that doesn't work? Are you bale to provide any documentation or screenshots of what you're trying to explain? Anything to make it clearer would be helpful

#582310

I have already provided the document links in my first answer:
https://toolset.com/forums/topic/showing-search-results-for-a-custom-taxanomy/#post-580970

I suggest you start with simple settings, with one filter in the view, if you still need assistance, please point out the problem page URL, where and how I can see the problem:
I tried using the same shortcode for ht other pages but that doesn't work

#582550

Can you provide screenshots so we can see where you're making these changes? We tried to follow the steps outlined and used the same shortcode but are unable to get the results you're getting form your shortcode.