Skip Navigation

[Resolved] Add search into its own row

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

Problem: I have created a custom search View in the legacy View editor. I would like to display the View in a Block Editor template. I would like to display the filters in one row that extends full width across the template, and I would like to display the results in a different area on the same page, in a grid that does not extend full-width.

Solution: Use the shortcode wpv-form-view to display the search filters independently, and use the wpv-view shortcode to display the results independently. Place those shortcodes in your Block Editor template using custom HTML or classic blocks.
Filters:

[wpv-form-view name="your-view-slug" target_id="self"]

Results:

[wpv-view name="your-view-slug" view_display="layout"]

Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-1496531
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154377

This support ticket is created 3 years, 5 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.

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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by stewartE 3 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#2073589
view.PNG

I have a view that is embedded into the page using Toolset Views legacy and Gutenberg. The view takes up half the page (i.e it sites within a row that has two columns. )

The issue is that I want the parametric search to span the whole width of the page and also to sit above both columns. When I embed the view into the right-hand column the search is also added there so it looks squished. What I need to be able to do is separate the search and the view so that I can add the search into its own row within the page.

I have attached a screenshot the example on the left shows what I am trying to achieve and the one on the right shows what I am currently seeing.

Thanks!

#2073741

Hello, if you created the View using the legacy View editor and you want to display the View in a Block Editor template, you can embed the filters and the results in separate blocks using shortcodes. We offer the shortcodes wpv-form-view and wpv-view, which can be placed in other blocks like custom HTML or classic blocks.

To display only the search filters and have the results shown elsewhere on the same page, use the wpv-form-view shortcode like so:

[wpv-form-view name="your-view-slug" target_id="self"]

Replace your-view-slug with the slug of the View.

To display only the results, use the wpv-view shortcode with the attribute view_display set to "layout":

[wpv-view name="your-view-slug" view_display="layout"]

Again, replace the View slug in this example.

Documentation for these shortcodes is available here in our programmer reference:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-1496531
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154377

Let me know if I've misunderstood what you want to achieve here.

#2074639

My issue is resolved now. Thank you!