I have had looked around for a while without success. I would like to make the default tagline editor in the Wordpress admin area being rendered as <textarea></textarea>
instead of <input type="text">
element. Is there any way to do it?
The tagline inputs I am talking about can be found in wp-admin > Settings > General and wp-admin > Appearance > Customize > Site Identity.
I have had looked around for a while without success. I would like to make the default tagline editor in the Wordpress admin area being rendered as <textarea></textarea>
instead of <input type="text">
element. Is there any way to do it?
The tagline inputs I am talking about can be found in wp-admin > Settings > General and wp-admin > Appearance > Customize > Site Identity.
Share Improve this question asked Jun 6, 2019 at 16:30 Norbert BiróNorbert Biró 1011 bronze badge 2 |
1 Answer
Reset to default -1I could be wrong but I don't think there's an easy way to modify these fields generally, you'd probably need to use a bit of JavaScript in the admin to manipulate the field when the page loads to change it from an input to textarea.
I've not tested this, but something like this in jQuery might work if triggered on page load:
$( '#blogdescription' ).replaceWith( '<textarea id="#blogdescription" name="blogdescription" aria-describedby="tagline-description" class="regular-text">' + $( '#blogdescription' ).val() + '</textarea>' );
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745431075a4627392.html
<title>
tag of the website. It does not support line breaks or HTML or anything you're thinking of adding. If you're trying to have something different in your header, then you'd be better of creating a child theme and modifying the header directly in that. – Jacob Peattie Commented Jun 7, 2019 at 8:38<input>
element. Recently they need to copy the text from the input into a text editor, edit it, then copy the edited text again into the input box. That's why it would be nice if I could replace it with<textarea>
. @JacobPeattie – Norbert Biró Commented Jun 7, 2019 at 11:17