Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. Change Search Placeholder Text

Change Search Placeholder Text

Scheduled Pinned Locked Moved Bug Reports
4 Posts 2 Posters 110 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KochMo
    wrote on last edited by
    #1

    Hey,

    is there a way to change the placeholder-text in the search field?
    This would be useful.
    I can see where it's defined, but I can't make my way through the code to change it.

    see u soon
    Mo!

    Bildschirmfoto 2021-11-19 um 17.05.19.png

    1 Reply Last reply
    0
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by
      #2

      Dear Mo

      @KochMo

      I don't think it can be changed within standard settings (someone please advise me if i'm wrong šŸŒ)

      We can use some very simple jQuery however to get the desired result. Within Lay Options > Custom CSS & HTML > the following code can be applied:

      <script>
          window.laytheme.on("newpageshown", function(layoutObj, type, obj){
            
            jQuery("input[type=search]").attr("placeholder", "Hey Mo! Best Wishes!");
      
          });
      </script>
      

      Screen Shot 2021-12-01 at 9.21.37 AM.png

      Result:
      Screen Shot 2021-12-01 at 9.21.02 AM.png


      Let me know how you go Mo & have a great day šŸ–
      Richard
      1 Reply Last reply
      0
      • K Offline
        K Offline
        KochMo
        wrote on last edited by
        #3

        Hey Richard

        Thank you for your help. Due to some other issues that had to be fixed first in the project process my answer is quite late. The code works nice and without problems. Thanks again!
        Mo

        1 Reply Last reply
        1
        • RichardR Offline
          RichardR Offline
          Richard
          Global Moderator
          wrote on last edited by
          #4

          @KochMo
          No worries Mo! have a wonderful day! 🌻

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          I also code custom websites or custom Lay features.
          šŸ’æ Email me here: šŸ’æ
          info@laytheme.com

          Before you post:
          1. When using a WordPress Cache plugin, disable it or clear your cache.
          2. Update Lay Theme and all Lay Theme Addons
          3. Disable all Plugins
          4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

          This often solves issues you might run into

          When you post:
          1. Post a link to where the problem is
          2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
          3. If the problem is difficult to explain, post screenshots / link to a video to explain it
          Online Users
          A
          alasdair17
          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
          laytheme.com
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search