• Resolved thedesignpeople

    (@thedesignpeople)


    Hi,

    I’m trying to make the cursor show in the input of the password field on the password protected page when it visits the page. Can anyone guide me on how to do it? Thanks!

    • This topic was modified 2 years, 11 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You’d need a bit of custom code that hooks the ‘the_password_form’ filter. Your callback is passed the form’s HTML. Search through the HTML for where the autofocus attribute should be inserted. Replace the found portion with the same including autofocus.

    Thread Starter thedesignpeople

    (@thedesignpeople)

    Thanks very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding autofocus to password protected input field’ is closed to new replies.