[Resolved] Change language of search box label

Home Forums Support [Resolved] Change language of search box label

Home Forums Support Change language of search box label

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1511426
    Gonzalo

    Hi there, where I can change language of search box label?
    http://prntscr.com/va9d0d

    #1511465
    Leo
    Staff
    Customer Support
    #1511536
    Gonzalo

    Thank you Leo,
    for this code, can I use a hook?

    add_filter( 'filter_name', 'generate_search_placeholder' );
    function generate_search_placeholder()
    { 
        return 'Buscar';
    }
    #1511537
    Leo
    Staff
    Customer Support

    No that’s a filter so one of these methods:
    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #1511580
    Gonzalo

    Thank you Leo, working.
    In case it helps another user, I use this code with Code Snippets plugin:

    add_filter( 'generate_search_placeholder', 'gs_change_search_language' );
    function gs_change_search_language()
    { 
        return 'Buscar';
    }

    Where ‘gs_change_search_language’ it’s my own function.

    #1511581
    Leo
    Staff
    Customer Support

    Thanks for sharing!

    #1520104
    Grant

    Hello,

    I am trying to do the same thing as Gonzalo. I used his code with Code Snippets (thanks) but it doesn’t seem to work. A few things:

    • I am using Relevanssi for search and asked the developer for input here
    • I don’t see the original text “Search” even when I deactivate the Relevanssi plugin.

    Any ideas?

    #1520325
    David
    Staff
    Customer Support

    Hi there,

    can you raise a new topic and share a link to your site where we can see whats going on.

    #1520645
    Grant
    #1520711
    David
    Staff
    Customer Support

    Glad to hear that!

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.