Add custom content in user-edit.php page

Solved it by using show_user_profile and edit_user_profile instead: add_action( ‘show_user_profile’, ‘wpse_237901_user_edit_section’, 999 ); add_action( ‘edit_user_profile’, ‘wpse_237901_user_edit_section’, 999 ); function wpse_237901_user_edit_section() { # Code here… }

After changing Site url to https, can’t access login page

I had the same problem. You need to install the plugin CloudFlare Flexible SSL https://wordpress.org/plugins/cloudflare-flexible-ssl/ As you can’t login in to dashboard so you can’t add that plugin now. But there is a way for this. Just login to cpanel or just use ftp. Then createa folder inside wp-content named mu-plugins . Now download that … Read more

Can’t publish, edit or delete posts since Gutenberg update

This is most likely a plugin or theme conflict in one way or another. Here’s the steps I’ve taken when troubleshooting Gutenberg-related issues: In a staging environment, deactivate all plugins — posting should work as intended now. If it doesn’t then the issue is more likely a theme conflict. 1.a. If it’s a theme conflict, … Read more

Changing Gutenberg / WP block editor width only on pages, not posts or other taxonomies

Because the WordPress hook add_theme_support( ‘editor-styles’ ); adds the css in the style-editor.css and appends the class .editor-styles-wrapper before my .wp-block, the usage of the body classes for page vs. post styles fails. Instead I use the answer from here, from David Walsh, to add the styles independently to the wp admin area: // Update … Read more

Call to undefined function insert_with_markers

Looks like insert_with_markers() function becomes available during admin_init hook. So in order for your code to work, you should do the following: function do_my_htaccess_stuff_371705() { //function `insert_with_markers()` is working now } add_action(‘admin_init’, ‘do_my_htaccess_stuff_371705’);

Registering jQuery kills admin functions

jQuery is not defined This is because the Google CDN Jquery is not in no-conflict mode. Use the following to make sure the included WordPress no-conflict jquery is used in admin. if( !is_admin()){ wp_deregister_script(‘jquery’); wp_register_script(‘jquery’, (“http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”), false, ‘1.4.2’); wp_enqueue_script(‘jquery’); }

Embed WordPress Admin in an iframe

By default WordPress doesn’t allow to embed the admin pages into a frame. From wp-includes/default-filters.php: add_action( ‘admin_init’, ‘send_frame_options_header’, 10, 0 ); To enable embedding, remove the action in a plugin: remove_action( ‘admin_init’, ‘send_frame_options_header’ ); Be aware of the security implications. I wouldn’t do that.