Block access to wp-admin

Placing the htaccess file in the wp-admin directory did not work for me so I went a different route and it seems to be working very well. Below is what I have in my main htaccess file: <files wp-login.php> # set up rule order order deny,allow # default deny deny from all allow from x.x.x.x … Read more

Add “Page Revised” column to Admin

Would need some prettifying, but basic code is following: add_filter(‘manage_pages_columns’, ‘add_revised_column’); add_action(‘manage_pages_custom_column’, ‘echo_revised_column’, 10, 2); function add_revised_column($columns) { $columns[‘revised’] = ‘Revised’; return $columns; } function echo_revised_column($column, $id) { if (‘revised’ == $column) echo get_post_field(‘post_modified’, $id); }

submit for review issue

Weird.. Have you checked the database on your own? Are you in the administrator group? Get your user id from the {tableprefix}_users table and search for the coresponding meta key {tableprefix}_user_level for your user id inside the {tableprefix}_usermeta table. The value should be set to 10. Do you have migrated the database from another wordpress … Read more

Creating WordPress Admin Themes

You’ll want to add your own stylesheet, e.g.: add_action(‘admin_head’, ‘custom_admin_style’); function custom_admin_style() { wp_register_style( ‘adminStylesheet’, plugins_url(‘adminstylesheet.css’, __FILE__) ); wp_enqueue_style(‘adminStylesheet’); } You can then style the admin as you like. For UI changes beyond styling its not possible to answer within the scope of this question as there are too many things possible to say in … Read more

How can I remove the new stats message? [closed]

The next level up would be an inline style in the head using a hook in a dedicated plugin or theme functions.php: function add_admin_css(){ ?><style>.gotonewdash {display: none;}</style><?php } add_action( ‘admin_head’,’add_admin_css’); Next level up after that would be an admin.css in a plugin with is_admin() and wp_enqueue_style

How to use Yoast SEO backend in english even if WPLANG variable is not english?

That plugin loads its language the moment its main file is included: load_plugin_textdomain( ‘wordpress-seo’, false, dirname( plugin_basename( __FILE__ ) ) . ‘/languages’ ); So when your locale filter is used, the language is already there. :/ Move your small plugin into the mu-plugins directory. You can create it if it doesn’t exists in wp-content. That … Read more

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… }