Posted: March 19, 2018 at 3:09 pm
|
Hi there I need to find a way to get the quick search function on the homepage of this website phoenixhsc.co.uk – just underneath the menu. I have tried working with WPtypes/WPViews and WPSearch but cant seem to get it configured correctly. Is there a way (an easyish) via a plugin anyone knows of that could help me achieve it or can point me in the direction of some code so I can do it? Much appreciated. |
|
In the link above – accreditation being parent category and course being child category |
Hi James, If those are all event categories then you could use the WordPress navigation menu manager and set up a menu item for each category, no coding required. If you want to build something with PHP, one WordPress function that you can use is wp_dropdown_categories(). With wp_dropdown_categories() you set the taxonomy, so you’ll set: |
|
|
Thanks Josh! For the PHP can you point me in the direction please for implementation? Also With the first option can I separate it out into 2 drop downs? Thanks for your help |
If you want to build something with PHP, one WordPress function that you can use is wp_dropdown_categories(). This will output a dropdown. If you want to output a list, then you can use get_terms() and follow this example: With either of the above functions you set the taxonomy, so you’ll set:
Can you clarify? What’s the first option, and what are the two items you’re looking to separate it out into? |
|
|
phoenixhsc.co.uk – the quick search underneath the menu – accreditation and courses section – I need search functionality like that. So parent category dropdown then show relevant child categories in the second. |
You should be able to use get_terms() for both of those. You can set |
|
The support post ‘Search Function help’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.