Placeholder for text input & textarea controls
Hi there
in version 0.6.2, I had added placeholder to text input controls by adding below lines of code to includes\controls\class-kirki-customize-text-control.php :
Line 5: public $placeholder = 'Write something here'; Line 9: if (array_key_exists('placeholder', $args)) { $placeholder = $args['placeholder']; } Line 24: <input type="text" placeholder="placeholder ); ?>" value="value() ); ?>" link(); ?> />
how can I add placeholder to kirki 0.7.1 (current version) text & textarea controls?! would you please add this feature to kirki master branch?! Or at least please guide me that I do it myself.
Thanks in advance
Hey there!
We now use the WordPress core controls for these. You can add your own placefolders using jQuery: http://stackoverflow.com/a/13152544
This is way old, but I found it via a google search. Just wanted to post for anyone that needs this... since Kirki uses native controls for text field you can use input_attrs param for this and it works great, no need for jQuery. https://wordpress.stackexchange.com/questions/276326/is-there-any-way-to-add-placeholder-for-wordpress-customizer-text-input-fields