Dashboard widget which is added by a popular SEO plugin “SEO by Rank Math” contains one unneeded element which can be annoying if you want to keep your WordPress dashboard clean and its loading time fast. It is “Latest Blog Posts from Rank Math” section which makes a remote request and loads links to 3 latest articles from Rank Math blog.
Luckily this part along with the links at the bottom is added via WordPress actions, which means that it can be removed the same way, but there’s one trick – these actions have been added inside a class, so a few helper functions are needed – the standard way with a simple call of “remove_action” function will not work.
1. Add a “WP Filters Extras” must-use plugin to your WordPress website
URL: https://github.com/herewithme/wp-filters-extras/blob/master/wp-filters-extras.php
Just open the URL above, download the file and add it to the “mu-plugins” folder in your WordPress installation (typically located under – /wp-content/mu-plugins/). If there is no “mu-plugins” folder, just create it under WordPress content directory.
2. Add this code to your theme functions file or in the MU plugin file you just installed
add_action( 'init', function() {
remove_filters_with_method_name( 'rank_math/dashboard/widget', 'dashboard_widget_feed', 98 ); // Removes the blog feed from Rank Math dashboard widget
remove_filters_with_method_name( 'rank_math/dashboard/widget', 'dashboard_widget_footer', 99 ); // Removes the three buttons (blog/help/go pro) from Rank Math dashboard widget
});
And that’s it! After this you should see only the relevant parts of this widget (depending on what Rank Math modules you’ve enabled).