Hello,
I apologize for the inconvenience you faced while trying to remove the Latest Blog Posts from Rank Math in the Dashboard using the provided code snippet.
To disable the Latest Blog Posts from Rank Math in the Dashboard, you can follow these steps:
- Navigate to WordPress Dashboard.
- Go to Appearance and then click on Theme File Editor.
- Select your theme’s
functions.php
file.
- Add the following code snippet to disable the Latest Blog Posts:
add_action( 'rank_math/admin/dashboard_widget/blog', '__return_false' );
- Click the Update File button to save the changes.
This code snippet will disable the Latest Blog Posts from Rank Math in the Dashboard without causing any issues.
If you encounter any further difficulties or need additional assistance, please feel free to reach out. Thank you for bringing this to our attention.
Sources:
How to Disable All Rank Math Generated SEO Tags Ā» Rank Math
Remove ārank-math-linkā Class from All Outbound Links Ā» Rank Math
How to Completely Uninstall Rank Math From Your Website Ā» Rank Math
How to Disable Rank Math SEO Content Tests Ā» Rank Math
Removing Schema From Your Posts & Pages Ā» Rank Math
Does not work properly. it completely breaks the rank math overview like the screenshot also it breaks the woocommerce status dashboard widget
Hello,
Thank you for your query, and we are so sorry about the trouble this must have caused.
Please use the code below to hide the blog posts from Rank Math at your WordPress Dashboard widget.
function hide_rank_math_content_on_dashboard() {
if (is_admin()) { // Check if we're in the admin dashboard
$screen = get_current_screen();
if ($screen->base == 'dashboard') { // Check if we're on the main dashboard page
echo '<style>
.rank-math-blog-title, .rank-math-blog-list {
display: none !important;
}
</style>';
}
}
}
add_action('admin_head', 'hide_rank_math_content_on_dashboard');
Hereās how you can add filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
We hope that helps, and please don’t hesitate to get in touch if you have any other questions.
Thank you.
Thankyou very much works as expected
Hello,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post or TrustPilot about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.