• Hi,

    I’ve installed Relevanssi to customize a search bar in page fort search post, and now my search bar on my menu header is set-up like the search bar in my page (and i don’t want, my menu header search bar is to search product). How can customize just my search bar on my page for search post with your plug-in?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Relevanssi uses the default parameters, unless the search form instructs otherwise. If you want a search form that only searches the post type post, the search form needs to have a post_type parameter set to post. For example like this:

    [searchform post_type="post"]

    Thread Starter ceolaboxeco

    (@ceolaboxeco)

    Bonjour,

    J’ai réussi a le parametrer comme je le veux mais le problème est que depuis que je l’ai parametrer pour la barre de recherche dans ma page “blog” cela a parametrer a la fois la barre de recherche de mon menu qui elle sert a chercher des produits

    Merci pour votre retour rapide et en esperant avoir été plus clair.

    Plugin Author Mikko Saari

    (@msaari)

    You can have separate search bars that search different things. How that exactly works out in your theme is something I can’t tell; asking theme support might be helpful here.

    Thread Starter ceolaboxeco

    (@ceolaboxeco)

    Thanks,

    But i have already done so they tell me to contact the support of Relevanssi…
    But when you have installed Relevanssi, they set all search bar because we don’t have a choise in the in the settings, no?

    Plugin Author Mikko Saari

    (@msaari)

    No, Relevanssi doesn’t restrict you at all, you can set different parameters to all your search forms. But if you don’t set any parameters in the search form, the search will use the same general Relevanssi settings.

    I’m not sure I follow what you want, but it sounds to me like you want to have a search form that searches products and another that searches posts. So you need to have Relevanssi index both products and posts, and then have two different search forms, one with the post_type parameter set to product and another one with the post_type parameter set to post. How you do that exactly depends on your theme.

    Thread Starter ceolaboxeco

    (@ceolaboxeco)

    Thanks,

    I don’t found where i can set the different search bar.
    I have divibuilder and i don’t use theme, i build since nothing.
    You understand exactly what i want, my menu search bar for everythink except the post and a search bar just for post.
    I have index just the post actualy.

    Plugin Author Mikko Saari

    (@msaari)

    Can you use shortcodes with the Divi builder? You can use the [searchform post_type="post"] shortcode to create a search form that only searches posts. You can also put that shortcode on a page, have it print out the search form and then copy the HTML code and use that.

    Thread Starter ceolaboxeco

    (@ceolaboxeco)

    Thanks, but i can’t change the appearance..

    And i like the settings i can make with relevanssi i search just where i can set the search bar of my menu differently of my search bar page.
    I use only divi builder, nothink more..

    Plugin Author Mikko Saari

    (@msaari)

    Adjusting the appearance of the search form is a question of CSS, you can adjust it as much as you wish. There are no limits.

    You can create as many search forms with different parameters, but if you do not understand my explanation, I don’t think there’s much else I can do about this. I’ve tried to help you as much as I can. I’ve told you already: you can use the search form shortcode, or you can use the HTML code of the form.

    I don’t know about Divi, I would recommend asking on Divi support forums. I’m sure other Divi users can help you with how to create different search forms in Divi better than I can, there’s nothing Relevanssi-specific about it, it’s the same no matter whether you use Relevanssi or the default WP search.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘set different search bar parameters’ is closed to new replies.