How can I create an alternate full-HTML editor for posts?

The Problem It seems that you’re using the normal theme template files for posts and pages to display your custom post type. This means, that you also got the wp_head() hook and other template, that output default (post/page specific) things. The solution Add a template file to your theme, that’s named single-{$post_type}.php and nothing than … Read more

Why does WordPress change a file’s permissions?

Per the link provided in my comment to your question, if you wish to prevent the editing of files by WordPress, just disable the file editor. To do that add the following to your site’s wp-config.php file: define(‘DISALLOW_FILE_EDIT’,true); Or to disable the file editor and the plugin and theme installation/update system: define(‘DISALLOW_FILE_MODS’,true);

Create keyboard shortcuts for HTML mode

It needs a bit of javascript to do that. You need a listener and some actions. Here we go… At first enqueueing the javascript to the post and post new screens: PHP: add_action( ‘plugins_loaded’, ‘keyboradshortcuts4htmleditor’, 10, 0 ); function keyboradshortcuts4htmleditor(){ add_action( ‘admin_print_scripts-post-new.php’, ‘keyboradshortcuts4htmleditor_enqueue_javascript’, 10, 0 ); add_action( ‘admin_print_scripts-post.php’, ‘keyboradshortcuts4htmleditor_enqueue_javascript’, 10, 0 ); } function keyboradshortcuts4htmleditor_enqueue_javascript(){ … Read more

Remove TEXT EDITOR form page [duplicate]

This question has an answer here . I think this will work for you. Let me know after trying add_action(‘init’, ‘init_remove_support’,100); function init_remove_support(){ $post_type=”page”; remove_post_type_support( $post_type, ‘editor’); }

How can I make the page editor trust me?

To avoid the line break when posting 2 images side by side assign the alignleft or alignright class to them and put them on the same line in the editor without skipping any spaces between them. Example: <img src=”https://wordpress.stackexchange.com/wp-content/uploads/your_image.jpg” alt=”” class=”alignleft” /><img src=”/wp-content/uploads/your_image2.jpg” alt=”” class=”alignright” /> Edit I forgot to mention that content after the … Read more

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