Skip to content

Instantly share code, notes, and snippets.

@Arkymedes
Arkymedes / gist:8266f577b6ed0cccb3e2
Last active August 29, 2015 14:26 — forked from pragmatic-web/gist:1885364
WordPress function to add the TinyMCE WYSIWYG editor to any custom field of type 'Textarea'
// important: note the priority of 99, the js needs to be placed after tinymce loads
// important: don't forget to change your selector
function admin_add_wysiwyg_custom_field_textarea()
{ ?>
<script type="text/javascript">/* <![CDATA[ */
jQuery(function($){
var i=1;
$('.your-selector-here textarea').each(function(e)
{