Ivory Search Settings – Menu Search Settings

Ivory Search Forums Support Ivory Search Settings – Menu Search Settings

Tagged: 

Viewing 2 reply threads

You must be logged in to create new topic or reply to the topic.

  • Author
    Posts
    • #23490
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,790

      I hope you are well today and thank you for your question.

      Currently, the Ivory Search plugin does not provide this functionality but I will consider implementing it in the future version of the plugin.

      In the meantime, you can do this by developing a custom code.

      If you are not a developer, you can consider hiring a developer to develop it. You can hire a developer from any freelance site or WordPress agency.

      You can also consider hiring me to develop it for you using the form https://ivorysearch.com/custom-work/

      Best regards,
      Ivory Search Support

      • #23492
        Portal InovarSaúde
        Participant
        • Topics: 1
        • Replies: 2

        Thanks for the reply, I understand, I realize that this option is not available in the Plugin, it would be very interesting to have it in future updates.

        As for the custom code, yes, I am a developer and I have tried some PHP alternatives but I can’t get to the Search that I have in my menu.

        In the files I attached, as you can see, I am changing the language of my website, but the code I have been trying to develop is not changing the search – In PT it should be “””Escreva o tema da sua Pesquisa””” and in EN it should be “””Write the theme of your search”””

        add_filter('wp_nav_menu_items', function ($items, $args) {
            if ($args->theme_location == 'secondary' && function_exists('pll_current_language')) {
                $lang = pll_current_language();
                $search_form = ($lang == 'pt') 
                    ? do_shortcode('[ivory-search id="10461" title="Pesquisa Geral PT"]') 
                    : do_shortcode('[ivory-search id="10462" title="Pesquisa Geral EN"]');
                $items .= '<li class="menu-item-search">' . $search_form . '</li>';
            }
            return $items;
        }, 10, 2);
        
        Attachments:
        You must be logged in to view attached files.
    • #23497
      Portal InovarSaúde
      Participant
      • Topics: 1
      • Replies: 2

      I have already managed to create a code that meets my needs, thank you for your help, for the future it would be interesting to have this option that I mentioned, I think.

      Thank you
      Good work 🙂

    • #23520
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,790

      Awesome great to see you got that achieved.

      Sure, we will consider it.

      Have a fantastic day!

Viewing 2 reply threads

You must be logged in to create new topic or reply to the topic.