Tagged: x
-
AuthorPosts
-
January 27, 2017 at 6:59 am #1347684
s_gogosParticipantHello there,
Could you please help me on this?
I tried to find the solution myself but I’m afraid I can’t 🙁My website (www.worldvespa.net) is – kind of – translated into two languages.
English is the primary and then I added Greek as my second language using “Polylang” plugin.
The problem is that the search button on the upper menu doesn’t give any results in Greek.
In English it works perfectly but in Greek it says that the page doesn’t exist.Can you help me modify the search button, to make it work for the second language, too?
Thank you in advance,
Stergios (www.worldvespa.net)January 27, 2017 at 6:59 am #1347685
s_gogosParticipantThis reply has been marked as private.January 27, 2017 at 4:44 pm #1348273
RadModeratorHi there,
Thanks for posting in.
Please add this code to your child theme’s functions.php
function x_navbar_searchform_overlay() { if ( x_get_option( 'x_header_search_enable' ) == '1' ) : $search_slug = ''; switch ( get_locale() ) { case 'el': $search_slug = '/αρχική/'; break; } ?> <div class="x-searchform-overlay"> <div class="x-searchform-overlay-inner"> <div class="x-container max width"> <form method="get" id="searchform" class="form-search center-text" action="<?php echo esc_url( home_url( $search_slug ) ); ?>"> <label for="s" class="cfc-h-tx tt-upper"><?php _e( 'Type and Press “enter” to Search', '__x__' ); ?></label> <input type="text" id="s" class="search-query cfc-h-tx center-text tt-upper" name="s"> </form> </div> </div> </div> <?php endif; } add_action( 'x_before_site_end', 'x_navbar_searchform_overlay' );I doubt this will work, the problem is related to redirection. Whenever I tried adding URL parameter, it redirects to the home page. Would you mind providing your FTP login credentials as well?
Thanks!
January 28, 2017 at 10:12 am #1348930
s_gogosParticipantThis reply has been marked as private.January 28, 2017 at 9:55 pm #1349267
RadModeratorThis reply has been marked as private.January 29, 2017 at 10:25 am #1349657
s_gogosParticipantNever mind, probably it has to do with “Polylang” plugin.
Could you please undo what you did?
Thanks for your time!January 29, 2017 at 10:28 am #1349659
s_gogosParticipantOh, I think it’s fine, I purged all the caches and looks like everything works fine… 🙂 (except for the search)
Thanks for your help.
I’ll contact the “Polylang” guys.January 29, 2017 at 10:45 am #1349678
ThaiModeratorLet us know how it goes!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1347684 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
