Convert textarea with wp_editor

This is was I use to convert textarea with wp_editor() wp_editor($value, “editor-name”, array( ‘tinymce’ => array( ‘theme_advanced_buttons1’ => ‘bold,italic,underline’, ‘theme_advanced_buttons2’ => ”, ‘theme_advanced_buttons3’ => ” ) ));

wp_editor not saving data, and text area showing html tags

There are a number of things going wrong in your code. I had to install it to see them all. First, You don’t want global $post. save_post will pass the post ID. Add a parameter to your callback. function save_points($post_id){ update_post_meta($post_id, “category”, $_POST[“category”]); update_post_meta($post_id, “brand”, $_POST[“brand”]); update_post_meta($post_id, “features”, $_POST[“features”]); update_post_meta($post_id, “holds”, $_POST[“holds”]); } Note: that … Read more

Save wp_editor() content as option

If you just want to get rid of the \ characters in the string that’s returned, you can use PHP’s stripslashes(): $content = stripslashes( $content ); I’d recommend doing this on output rather than on input; WordPress adds the slashes as it sanitizes your data on insert, per update_option()‘s Codex page, The $option (option name) … Read more

apply_filters(‘the_content’) – make it ignore shortcodes?

The function that parses the shortcode, do_shortcode is added as a filter on the_content by default, at priority 11. You can remove it using remove_filter: remove_filter( ‘the_content’, ‘do_shortcode’, 11 ); Call this right before you’re actually using the_content, and add it afterwards (in the unlikely case that it’s needed after that): remove_filter( ‘the_content’, ‘do_shortcode’, 11 … Read more

How to remove the statusbar from the default wordpress editor?

This ended up working for me, uses the tinyMCE init filter to remove the ‘statusbar’ entirely. /** Edit TinyMCE **/ function myformatTinyMCE($in) { $in[‘statusbar’] = false; return $in; } add_filter(‘tiny_mce_before_init’, ‘myformatTinyMCE’ ); Even with CSS, I couldn’t find a way to definitely remove the path but keep the status bar – here’s the CSS option: … Read more

add wp_editor to custom_meta_box

To use wp_editor() you’ll need to replace your textarea tag with the output from wp_editor() like so: case ‘textarea’: wp_editor($meta, $field[‘id’]); echo ‘<br /><span class=”description”>’.$field[‘desc’].'</span>’; break; You don’t need to echo wp_editor() since it does it automatically. You can pass an array of settings as a 3rd argument to configure it’s behaviour. More info here: … Read more

Front end wp_editor not rendering audio/video links

I’ve been fighting this for a while on a series of themes I make that provide a front end content creation interface not requiring a WP account. For the last two years I have said “trust me, URLs will embed”. Those old tickets are dormant, but I just have found a solution here https://wordpress.stackexchange.com/a/287623 For … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)