If you are a user of RankMath, I suspect you have encountered the annoying notification when you delete an item that is prompting you to set a redirect after you have deleted content. In and of itself, it is actually quite useful, but it doesn’t go away if you close it. Here is a quick code snippet that you can use to get rid of it.
<?php
add_action( 'init', function() {
RankMath\Helper::remove_notification( 'auto_post_redirection' );
});
Originally published on Sept. 3, 2022