Create Read Only Admin

Is there an easy way… AFAIK, no, not at all. If using a single site installation, you’d need to carefully disable (not hide, disable) all possible user actions that modify things. And this has to be done screen by screen (Posts, Pages, Comments, Appearance, Plugins, etc). For example, in the All Posts screen (/wp-admin/edit.php): /** … Read more

How can I add an extra admin column showing the word-count of a page or post?

It is not really difficult. Manage columns in posts list you can with 2 hooks: manage_posts_columns, manage_posts_custom_column add_filter(‘manage_posts_columns’, ‘wordcount_column’); function wordcount_column($columns) { $columns[‘wordcount’] = ‘Word count’; return $columns; } add_action(‘manage_posts_custom_column’, ‘show_wordcount’); function show_wordcount($name) { global $post; switch ($name) { case ‘wordcount’: $wordcount = YOUR_WORD_COUNT_VALUE echo $wordcount; } } Then you only need calc word count … Read more

Redirect loop (only for multisite network admin)

I also had the same redirect problem when trying to access wp-admin/network. Performing below changes fixed it. 1). In wp-config.php file, added www.website.com rather than just website.com define(‘DOMAIN_CURRENT_SITE’, ‘www.website.com’); 2). use phpmyadmin –> wp_blogs table Add www. to the domain value Basically, both site name and blog name have to be exactly the same. Cheers!

How to load a CSS file into WordPress admin area using Child Theme? [closed]

You need to use admin_enqueue_scripts hook to load CSS in admin area. This goes in your themes functions.php. Assumed that your file is at child_theme_path/css/admin-css.css function wpse239532_load_admin_style() { wp_enqueue_style( ‘admin_css’, get_stylesheet_directory_uri() . ‘/css/admin-css.css’, false, ‘1.0.0’ ); } add_action( ‘admin_enqueue_scripts’, ‘wpse239532_load_admin_style’ );