Forum Replies Created
You must be logged in to create new topic or reply to the topic. Click To Login
- AuthorPosts
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 🙂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.- AuthorPosts
You must be logged in to create new topic or reply to the topic. Click To Login