Using WordPress’ WYSIWYG for comments

Give this a shot: <?php /* Add WYSISYG editor to comment form. */ add_filter( ‘comment_form_field_comment’, ‘wpse_64243_comment_editor’ ); function wpse_64243_comment_editor( $field ) { if (!is_single()) return $field; //only on single post pages. global $post; ob_start(); wp_editor( ”, ‘comment’, array( ‘textarea_rows’ => 15 ) ); $editor = ob_get_contents(); ob_end_clean(); //make sure comment media is attached to parent … Read more

Adding content to archive and taxonomy pages on custom post types?

First solution can be using the Settings API and create 2 fields “Products Description” and “Usage Description”, after that showing in your template that fields is easy like a: $options = get_option(‘my_theme_options’); echo $options[‘prod_description’]; // echo $options[‘usage_description’]; However, settings API is not the best part of WP core, and probably create a settings page for … Read more

How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with WordPress 3.0 and up?

Pre WP 3.3: http://www.dev4press.com/2010/tutorials/wordpress/tips/add-rich-text-editor-to-your-plugin/ If you are using WP 3.3 or later you might look up wp_editor: http://codex.wordpress.org/Function_Reference/wp_editor $settings = array( ‘teeny’ => true, ‘textarea_rows’ => 15, ‘tabindex’ => 1 ); wp_editor(esc_html( __(get_option(‘whatever_you_need’, ‘whatever’))), ‘terms_wp_content’, $settings);

Is there a way to get N number of WYSIWYG editors in a custom post type?

Say your custom post type was called Properties, you would add the box to hold your additional tinyMCE editor using code similar to this: function register_meta_boxen() { add_meta_box(“wysiwyg-editor-2”, “Second Column”, “second_column_box”, “properties”, “normal”, “high”); } add_action(‘admin_menu’, ‘register_meta_boxen’); wysiwyg-editor-2 is the ID that the meta box will have applied to it, Second Column is the title … Read more