• Resolved pogoshow

    (@pogoshow)


    Hello

    I have a problem with search result page. I mean, I can’t translate page title “Search Results for” Look here
    I’m surprised, because the brwoser’s tab title is translated. Look here

    Do you know where to find the code responsible for this fragment and can change it manually?

    I will be grateful for any hint.
    Robert

    The page I need help with: [log in to see the link]

Viewing 15 replies - 16 through 30 (of 33 total)
  • Thanks @simon110324
    Worked perfectly! ??????

    OMG, thanks. You saved me. I would have never thought of looking into the Elementor Pro translations!

    @simon110324
    Many thanks
    Your solution was very simple and perfect!
    (without needing to add another plugin or accessing code)

    • This reply was modified 3 years, 8 months ago by Hagai Shaul.

    Hi @javierpiedra, I tried your alternative since the other alternatives didn’t work for me.

    But, now the archive title appears blank. It doesn’t saying “Search Results for” or anything else (I’m trying to translate to Spanish).

    Is there something that I need to change in the code you suggested?

    Any direction here would be greatly appreciated.

    Thanks!

    Hola @willymunoz23,

    sería cuestión de ver el código que usaste en el archivo functions.php, un screenshot o enlace a tu página de archivo y también el código de la función del plugin Elementor que altera este pedazo de código.

    quizás en la versión actual de Elementor ya no es necesario hacer este ajuste de esta manera.

    Hola @javierpiedra, gracias por tu respuesta.

    Este es el código que usé en el archivo functions.php (lo copié tal cual lo publicaste aquí en el foro): https://imgur.com/9YXVTZy

    Y este (creo) es el código de la función de Elementor: https://imgur.com/LahN4I5

    ?Consideras que hay algo que debería de cambiar en el código que agregué a functions.php?

    Gracias por tu tiempo.

    Lbch

    (@iinteractivenl)

    To change the text “Search Results for:” archive title for the Search Results page in Elementor, use the official solution, which can be found at Hello Theme FAQs, Tips and Tricks:

    add_filter( 'elementor/utils/get_the_archive_title','archive_callback' );
    function archive_callback( $title ) {
     if ( is_search() ) { 
       return 'Your Custom Message Here: ' . get_search_query() ; 
     } 
       return $title; 
    }

    Thanks @iinteractivenl! This worked perfectly!

    • This reply was modified 3 years, 7 months ago by willymunoz23.

    hi thank you ll for solve the problem.
    the code helpd.
    but please i have another problem.
    whhen the result not find enything its still not translate the text:
    “It seems we can’t find what you’re looking for.”

    its wired because on the loco plugin its looks that yes.

    who can i change it
    i will be happy for your help
    thanks alot

    Great solution @simon110324, thanks a lot

    (@simon110324) dude you made my day! that works so perfect!!!!

    Despite multiple attempts, I haven’t been able to resolve this problem. I would like to translate the “search results” title for the french version of my site. (See the image below.)
    https://postimg.cc/4nsJzT2n
    I installed loco translate, created a new language, searched for the phrase that I needed translating, and then placed the translation. (See image below)
    https://postimg.cc/0MNVsj2b
    The second solution I tried was to add a custom attribute in the Elementor advance settings. See the image below.
    https://postimg.cc/XpxXZvVV

    Any advice would be greatly appreciated.

    @jmblues You are officially my heroe of the day!

    Loco translate cannot find the phrase, so I wonder why that is? Maybe the Dutch PO file does not contain all terms?

    Thanks anyway!
    Monique

    @simon110324 muchas gracias, si funciona!!!

    add_filter(‘elementor/utils/get_the_archive_title’, ‘custom_search_title_il’);

    function custom_search_title_il($title){
    if ( is_search() ) {
    /* translators: %s: Search term. */
    $title = sprintf( __( ‘Add Your custom title here: %s’, ‘elementor-pro’ ), get_search_query() );

    if ( get_query_var( ‘paged’ ) ) {
    /* translators: %s is the page number. */
    $title .= sprintf( __( ‘ – Page %s’, ‘elementor-pro’ ), get_query_var( ‘paged’ ) );
    }
    }
    return $title;
    }

    Change “Add your custom title here” text and paste the code in functions.php in child theme

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘“Search Results for” translate title’ is closed to new replies.