Home Support Themes ListingHive Is it possible to have two search bars with different text?

Is it possible to have two search bars with different text?

  • Author
    Posts
  • DeeUK

    I have created a directory based on restaurants but I would also like to have a separate page for classified jobs in the restaurant industry. I have changed the text on the main search from keywords to say “What do you fancy? E.g indian, chinese etc. I would like this to change this for the classifieds page to say “search by keyword or Job title”. Is this possible?

    2nd question, is it possible to narrow the search to certain categories?

    ihor developer

    It’s possible, but requires some code customizations, please try starting with this snippet https://hivepress.io/support/topic/add-different-static-placeholders-of-the-search-fields/#post-16553 The search forms on the category pages already have categories pre-selected (so they’ll search within the current category).

    DeeUK

    Thanks I’m quite new to this so I’m not sure at all when it comes to these custom snippets. I can manage css customisations and would love to learn how to customise things myself but the instructions seem a little too advanced for me 🙁

    nazar developer

    Please try managing PHP snippets with this plugin https://wordpress.org/plugins/code-snippets/ or add them to the child theme’s functions.php file.

    DeeUK

    Thanks for your reply nazar, I actually did use this plugin but all it does is show “everything “ in the search bar instead of what I changed it to in loco translate. I’m not sure how it helps me :/

    ihor developer

    Do you mean that the search field placeholder just shows the “Everything” word? The suggested code snippet should set the current category name as the search field placeholder (on the listing category pages). You can also change the “Keywords” name to another static word via Loco Translate https://www.youtube.com/watch?v=zeOL8uh6jiM&ab_channel=HivePress Other placeholder changes with some custom logic may require advanced customizations.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.