Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Change the placeholder text for the new search modal

  • Hello @David,

    Hope you are doing well.

    I want to change the text placeholder for the new search modal.
    The default one is: Search …

    <input id=”search-modal-input” type=”search” class=”search-field” placeholder=”Search …” value=”” name=”s”>

    Could you please advise?

    URL: https://charbelnemnom.com

    Many Thanks!
    -Charbel

  • Hi there,

    you can use this PHP Snippet:

    
    add_filter('generate_search_placeholder', function(){
    	return _x( 'YOUR PLACEHOLDER HERE', 'placeholder', 'generatepress' );
    });
    
  • Thank you, @David, much appreciated!

    It worked as expected!

    Many Thanks!

  • You’re welcome

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