• Resolved Fat Tony

    (@wildpluckings)


    Hello everyone,

    I’m having trouble disabling a warning message in Yoast SEO that I’m getting every time I delete a song post on my site. This is a custom post type. The warning message reads:

    “Make sure you don’t miss out on traffic! You just deleted a Song. Search engines and other websites can still send traffic to your deleted post. You should create a redirect to ensure your visitors do not get a 404 error when they click on the no longer working URL. With Yoast SEO Premium, you can easily create such redirects.”

    The thing is, I don’t want to create a redirect for every single deleted song post on my site as I will very rarely delete them and there will be thousands of song objects. Also, my 404 page clearly states that the song is now gone.

    I have looked through the Yoast SEO settings but can’t seem to find a way to turn off this warning message. Can someone please help me out or point me in the right direction?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @wildpluckings

    Thanks for using the Yoast SEO plugin. When you delete content on your site, we display a reminder notification to add a redirect for the removed item.?But I understand if you don’t want to be reminded; add these filters to your theme’s functions.php file:

    add_filter('Yoast\WP\SEO\enable_notification_post_trash', '__return_false' );
    add_filter('Yoast\WP\SEO\enable_notification_post_slug_change', '__return_false' );
    add_filter('Yoast\WP\SEO\enable_notification_term_delete', '__return_false' );
    add_filter('Yoast\WP\SEO\enable_notification_term_slug_change', '__return_false' );

    If you’re unfamiliar with using code snippets, we’d like to refer you to the WordPress documentation on how to use a filter.

    Plugin Support Maybellyne

    (@maybellyne)

    This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t Disable SEO Warning About Deleted Posts’ is closed to new replies.