Skip Navigation

[Resolved] Display only search from shortcode

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

Problem:
What are the shortcodes for separately inserting a View search form and the View results?

Solution:
It depends on whether you are inserting the results on the same page as the search form or on a different page.

The best way to get the correct shortcodes is to edit a page (with the classic editor) and use the Fields and Views button to insert the View, and then use the UI prompts for determining what is inserted where.

This will generate the required shortcodes, which can then be cut and pasted to use in a different context (e.g. page builder modules) if required.

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by Pete 5 years, 4 months ago.

Assisted by: Nigel.

Author
Posts
#1314833

Hi there,

Using Elementor is great however we never get to see the shortcodes. Not an issue until now.

From this crazy long page of codes on your site: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view

I saw I could use this...

[wpv-view name="Home Page Search Bar Three"]

Great however how do I get this to show just the form in one code?
And the the results in another?

We con do this easily using Elementor however I need codes for what we need to do.

Thank you.

#1315209

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Pete

The easiest way to generate the correct format for the shortcodes when displaying the results in a different place (including on a different page) to the search form is to edit any-old-dummy-page without Elementor with the classic editor and use the Field and Views button to insert the View. You'll get similar UI options as available with the Elementor widgets to indicate that the results should be in different locations, enabling you to first generate the shortcode to insert just the search form, and then generate the shortcode to insert the results, which you can then use wherever you actually need them.

#1317977

My issue is resolved now. Thank you!