Visual Editor is blank – 404 for plugin js

Have you updated to the latest version of the WCK – Custom Fields and Custom Post Types Creator plugin? The issue is with the WCK – Custom Fields and Custom Post Types Creator plugin and you should probably seek direct assistance from them. https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/ When I checked the plugins code (vers. 1.1.5) I can see … Read more

Disable Content Editor for Specific Pages

Your if condition is wrong and generates a syntax error. You need an logical operator to check for multiple conditions. Therefore your code should look like the following: if ( $template_file === ‘page-custom-one.php’ || $template_file === ‘page-custom-two.php’ ) { remove_post_type_support( ‘page’, ‘editor’ ); } You could also check for multiple values with the in_array function … Read more

Stop editor from adding “amp;” after every “&”

One solution is to hook into wp_insert_post_data and do some regex magic to replace all instances of & with &: // when saving posts, replace & with & function cc_wpse_264548_unamp( $data ) { $data[‘post_content’] = preg_replace( “/&/”, // find ‘&’ “&”, // replace with ‘&’ $data[‘post_content’] // target the ‘post_content’ ); return $data; } add_filter( … Read more

Show class from css in format dropdown

Array value ‘content_css’ is not enough, TinyMCE can’t simply get the classes from the custom.css file. You need to define the list of styles you want in the dropdown: function my_format_TinyMCE( $in ) { $in[‘content_css’] = get_template_directory_uri() . “/custom.css”; $in[‘importcss_append’] = TRUE; $in[‘style_formats’] = json_encode(array( array(‘title’ => ‘Title for Style #1’, ‘classes’ => ‘example-class’), array(‘title’ … Read more

Prevent editor from adding script or form

By default, editors and admins in a single site installation have the unfiltered_html capability, which means they can insert any JavaScript and forms. If you want to disallow that, you can remove that capability from the editor role as described in Why is javascript allowed in my post content? or using a plugin like Members. … Read more

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