admin管理员组文章数量:1429841
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>' );
本文标签: theme developmentHow do I change the tagline input to textarea
版权声明:本文标题:theme development - How do I change the tagline input to textarea? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745431075a2658327.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