Skip Navigation

[Resolved] Creating one field search that links to an existing view

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

Problem:

I have an existing view that includes filters and results that I'm happy with. I'd like to use only one of the filters on the home page and land the search on the page that I've built with the view and full search.

Is there way to build only a search that links to the results on another page?

Solution:

You can get the page ID with Views shortcode:[wpv-post-id], then use it in [wpv-conditional] shortcode, check if it isn't specific home page ID, display other filter fileds in the search form. for example:

https://toolset.com/forums/topic/creating-one-field-search-that-links-to-an-existing-view/#post-1138845

Relevant Documentation:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional

This support ticket is created 6 years, 3 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 4 replies, has 3 voices.

Last updated by lauraS-5 6 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1137867

Sorry if this it obvious, but I can't figure out how to execute.

I have an existing view that includes filters and results that I'm happy with. I'd like to use only one of the filters on the home page and land the search on the page that I've built with the view and full search.

Is there way to build only a search that links to the results on another page?

#1138133
#1138404

Thank you! But these pages don't quite solve for my concern. I have the following:

1. A view that contains:
A. A search form that has multiple filters
B. Formatted search results

2. From this view I have built the page that I want my users to search for this content.

What I want to create:
3. A search form that includes only one of the filters from the 1.A but that links to 2 with the one filter set. The page would have all the other filters so that the user can refine them.

What confuses me is how to build a search form in a view and have the results landing on the results from another view. Is that possible? I assume I could try to build something custom that built a search string that fed into #2, but was hoping it was built into Toolset somewhere.

#1138845

Hi,

How do you setup the "home page", if it is a wordpress page, you can get the page ID with Views shortcode:
[wpv-post-id], then use it in [wpv-conditional] shortcode, if it isn't specific home page ID, display other filter fileds in the search form.

For example:

[wpv-conditional if="('[wpv-post-id]' ne '123')"]
display other filter fileds for example: "wpv-control-post-taxonomy" and "wpv-control-postmeta"
[/wpv-conditional]

More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional

#1143242

My issue is resolved now. Thank you!

Please consider allowing the building of unique search forms that interact with existing views.