Skip Navigation

[Resolved] How to create drop-down menu to redirect users to different pages

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

Problem:

How to create a custom search form + search results with Toolset plugins?

Solution:

you can follow our document to setup a post view with search form:

Relevant Documentation:

https://toolset.com/course-lesson/creating-a-custom-search/

This support ticket is created 2 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
- 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 11 replies, has 3 voices.

Last updated by ritaZ 2 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2356785

Dear Support,

I'm referring to this link hidden link, trying to create a similar one with drop-down menu that can lead users to different pages. Users can select different region and go to different pages for more information.

Can we achieve it with using Toolset? I checked the documentations but didn't have a clear clue on it.
Thanks a lot!

#2356879

Nigel
Supporter

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

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

Are the pages you want to link to in this menu dynamically generated in some way, or it is just a static list of pages that you will choose?

Toolset doesn't have anything for generating a styled dropdown like that, and if it is a static list of links it is something that could be created directly with HTML, with your own CSS style rules.

If you are using blocks then several 3rd-party block library plugins (e.g. Kadence and Stackable) have accordion blocks which you could use for something like this. In the body of the expandable accordion you could use the Single Field block to insert the post title as a link, where you set the source to the page you want to link to.

Does that make sense?

#2356893

Hi Nigel,

Thanks a lot for replying. It could be a static list of pages for users to select. I'm trying to avoid coding without HTML or CCS.
I'm the admin of our WP and it was one business user requested the similar page like the example I shared.

Any idea something we can do with Toolset directly? I'm just taking this task over from a leaving colleague, sorry if I'm being stupid:(

#2356931

Hello,

The demo page you provided above is just a search form with search result, it does not redirect users to other page automatically.
If you want to setup the same result as your demo page, you can follow our document to setup a post view with search form:
https://toolset.com/course-lesson/creating-a-custom-search/
For example, you can try these:
1) Create a custom post type "app-details"
https://toolset.com/course-lesson/creating-a-custom-post-type/
2) Add a custom taxonomy "province", assign it with above post type:
https://toolset.com/course-lesson/creating-a-custom-taxonomy/
3) Create a page "search app-details", in this page display a view block with custom search form, let user to filter the result by "province" taxonomy, and in view's loop, display the "app-details" post information + post link, so user can click the post link to the "app-details" detail page.

#2356933

Hello Luo,

Thanks a lot for the instructions, I will explore further to see if we can accomplish it this way:)

And update back on the outcome.

#2358537

Please update here if you still need assistance for it, thanks

#2358781
test page.png

Hi Luo,

I tried to test it with a new page, however, after the custom search page was updated, it didn't show up on the page by using Preview or added this page into website menu. I can't see the search dropdown feature or anything at that page.

What am I missing?

#2358903

Hi Luo,

Another question I have is how I can relate my custom post type with the source posts?
My understanding was to create new Posts, like Guangdong, Beijing, then convert them from Post type to my Custom Post Type, then we can somehow link the new posts to this created Custom Post Type?

#2359449

Please provide a test site with the same problem, fill below private message box with login details, also point out the problem page URLs, I can setup a demo for you.

#2360415

Dear Luo,

So the original concerns have been gone after I upgraded our Toolset versions. Now I used new post type with custom field. following the links you shared and set up a new page where we can add search view and everything else.

The current remaining question is - I have the drop-down list and when visitors select one option, it displayed that content, this is OK. However, when the page was firstly launched, it displayed all the contents, this is terrible, I tried to set up one option as the default via custom fields but it made no difference.

For example I have one option called Guangdong, how can I set it as default content, so when visitors come to this page, it shows Guangdong content only, of course they can select other option, then different content will be displayed?

#2360479

You can follow the document I mentioned above to "Hide the search results until the first search":
https://toolset.com/course-lesson/creating-a-custom-search/#hide-the-search-results-until-the-first-search
section "Hide the search results until the first search"

#2360483

My issue is resolved now. Thank you!