Skip Navigation

[Resolved] get id of custom archive page in order to use wpv-form-view shortcode

This support ticket is created 3 years, 9 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by Minesh 3 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#1975111

Tell us what you are trying to do?

I need to implement the google search functionality that's being used on this page hidden link on the home page and redirect back to hidden link to display the results. The way I assume I need to do this is to render the view on the home page via the wpv-form-view shortcode which requires the page id to display the results on a different page.

Is there any documentation that you are following?

No.

Is there a similar example that we can see?

No.

What is the link to your site?

hidden link

#1975307

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

First of all, let me try to clarify the things.

On the following page: hidden link
As I understand, you want to display search form and search result on the same page. Having said that, search form at the top of the page and search results below the search form - correct?

If yes, can you please tell me where exactly you stuck or correct me if I'm wrong with few screenshot or by sharing bit more details.

#1975761
Screenshot 2021-03-05 083006.png

Hi, thanks for responding. I have created a new view that utilizes a distance filter similar to the view that's being displayed on this page hidden link (the left input that autocompletes location search entries powered by google). I need to render this new view on the home page (hidden link) where there is currently a custom input field to search for a provider by location (screenshot attached). I want the home page search to then display the results on this page hidden link, which is the practice location archive. My understanding is that if I want to render a view and redirect to a different page to display the results, I can use the wpv-form-view shortcode, but it requires a page id as the last parameter (ex. [wpv-form-view name="find-a-provider" target_id="19475"]). I need to figure out if it's possible to get the 'page id' of the archive page where I want the results to be displayed on. Please let me know if I haven't explained clearly enough or if you need more detail.

#1978431

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You will require the page ID as you are allow to set the search result page but not the archive page.

So, you will require to create a page where you can display the search result instead of archive.

#1980069

Thanks Minesh. For SEO reasons, I'm not sure that's the best option for me. Is there a way to trigger the google search functionality inside a custom html search? Then I can redirect to the existing archive to display the results?

#1980549

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

No - there is no such feature available to link the search result to archive page.

As suggested, the workaround would be to create a page that just works like your archive and add the search result on that page.

#1981211

That's not going to work. What exactly triggers the google autofill of the addresses? How can I create an input box that will trigger the autofind/autofill address from google?

#1986435

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The google auto fill is coming from google.

Please check the following: hidden link

If you still want to make it work (without using Toolset as acknowledged that Toolset do not offer feature to redirect search on archive page) it will require custom code that is eventually beyond the scope of our support policy. You may contact our certified partners who may help you at: https://toolset.com/contractors/