Line numbering on WordPress frontend

It’s not really a WordPress related question, but it’s kind of related to visual editor. If your content is just raw text separated by <br> tags, I can’t think of any way to do it. But if your content’s structure is like this: <p>My first line</p> <p>Second line</p> <p>This is the third</p> Then you can … Read more

TinyMCE Visual Blocks plugin set Show blocks option for all users

Just add this code to functions.php of your theme and then “View” –> “Show blocks” will always be enabled immediately when the page loads if( !function_exists(‘custom_settings_tinymce’) ){ function custom_settings_tinymce($init) { $init[‘visualblocks_default_state’] = true; return $init; } add_filter(‘tiny_mce_before_init’, ‘custom_settings_tinymce’ ); }

Adding custom styles to dropdown in editor

You can add this code to your functions.php function add_style_select_buttons( $buttons ) { array_unshift( $buttons, ‘styleselect’ ); return $buttons; } // Register our callback to the appropriate filter add_filter( ‘mce_buttons_2’, ‘add_style_select_buttons’ ); //add custom styles to the WordPress editor function my_custom_styles( $init_array ) { $style_formats = array( // These are the custom styles array( ‘title’ … Read more

Visual Editor Templates

Short answer: kinda The visual editor is the open source Tiny MCE WYSIWYG editor. You can style it however you want (i.e. so that it presents the same colors and fonts as the finished posts and pages) by writing a stylesheet to do so and loading it with the add_editor_style hook. However, it sounds more … Read more

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