Remove text tab

This requires two steps: 1) First, we need to hide the editor tabs, which can be accomplished easily enough using CSS. We’ll output some CSS to the admin head to do that: function hide_editor_tabs() { global $pagenow; // Only output the CSS if we’re on the edit post or add new post screens. if ( … Read more

Using main style.css with add_editor_style

The simplest answer is: you can use whatever stylesheet you want for the editor. editor-style.css is just the default stylesheet loaded if none is passed to add_editor_style(). This will load the specified stylesheet: add_editor_style( ‘some-stylsheet.css’ ); This will load editor-style.css: add_editor_style(); Use whatever better fits your needs. By the way, it is better practice to … Read more

How do I add a listbox to the TinyMCE editor?

In the TinyMCE plugin i wrote, my listbox wraps selected text in HTML, i do that like this.. onselect : function(v) { // Set focus to WordPress editor ed.focus(); // Get selected text var sel_txt = ed.selection.getContent(); // If no text selected if( ” == sel_txt ) return null; var active_style = toggle_styles[v]; if( ‘undefined’ … Read more

Having a lot of difficulty getting add_editor_style() to load into source code

You shouldn’t call add_editor_style() directly in your functions.php file. Instead, you should wait until the plugins and themes have been loaded: add_action( ‘after_setup_theme’, ‘add_editor_style’ ); If you already have a function hooked to after_setup_theme, you can call add_editor_style() inside there instead. You then need create a file called editor-style.css and place it in your theme … Read more

WordPress Wysiwyg Content not being displayed

To expand on what @fischi said, first step to troubleshooting is switch to the default theme (twentyeleven) and disable all plugins. If your content shows up, turn plugins back on one by one until you either find the offending plugin or they’re all on. If you get them all back on and the content still … Read more

Hide WYSIWYG editor on certain templates

I hope I understood your question right. The following code will remove the editor from the pages using particular templates: <?php function wpse242371_remove_editor_from_some_pages() { global $post; if( ! is_a($post, ‘WP_Post’) ) { return; } /* basename is used for templates that are in the subdirectory of the theme */ $current_page_template_slug = basename( get_page_template_slug($post_id) ); /* … Read more

Content editor creating blank paragraphs in spaces and creating &nbsp in the_excerpt

Judging from your site’s content and the comments, you may try using the following CODE in your theme’s functions.php file. It’ll remove empty <p>&nbsp;</p> tags from post content: add_filter( ‘the_content’, ‘wpse_257854_remove_empty_p’, PHP_INT_MAX ); add_filter( ‘the_excerpt’, ‘wpse_257854_remove_empty_p’, PHP_INT_MAX ); function wpse_257854_remove_empty_p( $content ) { return str_ireplace( ‘<p>&nbsp;</p>’, ”, $content ); } However, after it removes the … Read more

Ability to edit image via WYSIWYG

You maybe smoking something, but it doesn’t change the fact that you are right 😉 WP image management, (or should I say TinyMCE image management) is really sub par. ImagePro might be a good solution for you. Not only does it help replacing images in editor but also resizes them and displays a server-generated resized … Read more

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