[Support request] Change the "Search …" word into a Magnifying Lens icon

Home Forums Support [Support request] Change the "Search …" word into a Magnifying Lens icon

Home Forums Support Change the "Search …" word into a Magnifying Lens icon

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #943920
    Antonio

    Hi I have question regarding the GeneratePress “Search” function.

    In a website I have it displayed into the Top-bar and it works properly but my client would like to change the “Search …” word int a Magnify lens icon (maybe i can use the font-awesome library?).

    Is that possible? if yes can give me a hint? In the specific I would like to use the font-awesome library.

    I am using GP Premium and the Child Theme

    Thanks a lot πŸ™‚

    #944125
    Leo
    Staff
    Customer Support

    Hi there,

    I believe this is what you are looking for:
    https://docs.generatepress.com/article/generate_search_placeholder/

    You can search generate_search_placeholder in this forum to see some examples.

    Let me know if this helps πŸ™‚

    #946031
    Antonio

    Hi,

    Thanks for the answer. I tried as you said (I am using a child theme and I did the change in the functions.php file)

    But is not working πŸ™

    This is what I am trying:

    add_filter( 'generate_search_placeholder','lh_search_placeholder_icon' );
    function lh_search_placeholder_icon()
    {
    	return '<i class="fa fa-search" aria-hidden="true"></i>';
    }
    #946260
    Tom
    Lead Developer
    Lead Developer

    Icons can’t be added as placeholders like that, unfortunately. Do you have any examples of the look your client is going for that we can see?

    #946269
    Antonio

    Something like that

    Search Icon

    or like the one used here https://www.bs.ch/

    #946579
    Tom
    Lead Developer
    Lead Developer
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.