Remove some articles from the list in WPAdmin for a user

This could done with couple of ways: With pre_get_posts Small modification will need it like the actual meta value names function alter_edit_php_query_remove_posts($query) { $screen = get_current_screen(); if(is_admin() && $screen->post_type == ‘post’) { $current_user = wp_get_current_user(); $key = ‘nickname’; $single = true; $user_meta_value = get_user_meta( $current_user->ID, $key, $single); $meta_query = array( array( ‘key’=>’_edit_last’, ‘value’=>$user_meta_value, ‘compare’=>’=’, ), … Read more

When using https, wordpress doesn’t use https for CSS and JS, and admin doesn’t work. How do I fix this?

Check two things: in the wp-options table, the site URLs (in two places) should be the full URL, as in https://www.example.com . check the site’s htaccess file for proper rewrite of http to https. For a htaccess rule, this one works in most case: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Then look … Read more

Add text to post list/edit screens?

If you are OK with using javascript, you can try the following in your functions.php file: add_action(‘admin_footer’, ‘my_admin_footer’); function my_admin_footer() { $uri = isset($_SERVER[‘REQUEST_URI’]) ? $_SERVER[‘REQUEST_URI’] : NULL ; $message = NULL; if ($uri AND strpos($uri,’edit.php’)) { if (strpos($uri,’post_type=page’)) { $message=”My custom message for page list”; } else { $message=”My custom message for post list”; … Read more

How to remove Broken Link Checker widget from admin menu

The problem is probably just that your code runs before broken links checker adds the meta box. Try changing the action line to this: if(is_admin()){ add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’, 1000 ); } EDIT To be a little more clear, the particular issue here is that the add_action() function is running super early compared to Broken Link Checker’s … Read more

Rename W3 Total Cache admin menu

You may be able to use the WordPress filter ‘gettext’: http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext add_filter( ‘gettext’, ‘rename_menu_item’ ); function rename_menu_item( $translated ) { $translated = str_replace( ‘Performance’, ‘Ytelse’, $translated ); return $translated; }