Modify links when inserted by WYSIWYG editor

The HTML for the inserted internal links are generated by Javascript, so I’m not aware of any easy way to change it. The HTML generation is controlled from the wpLink.htmlUpdate method (HTML mode) and the wpLink.mceUpdate method (TinyMCE mode), in the /wp-includes/js/wplink.js file. Here are some ideas: Add a query parameter to the inserted links: … Read more

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

Simple rich text editor in Text widget?

I’ve never found one that was reliable and/or not a huge resource/memory drain. 🙁 I ended up using the very handy “Page in Widget” plugin instead – it has the advantage of all the functionality of a regular editable page and your widget content won’t accidentally get wiped, which has happened to me far too … 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);

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