• Resolved Jeremy Scott

    (@jeremyescott)


    Hi Team Yoast,

    I write a plugin called Matador Jobs which creates Job Postings type posts from externally API-accessed data. It also removes those postings when they expire or are closed.

    Per Google’s documentation on Job Postings Schema for Google for Jobs, Google prefers we either serve a 410 temporarily and/or 404 (permanently) when a job posting is removed. Yoast, when active on a site, will create a notification for every removed Job Posting, which can be 10s or 100s per day and extremely annoying for users.

    They value 404, slug change, etc notifications for blog posts and pages, but not for jobs. I want to add code to my plugin to nicely ask Yoast to ignore our post type.

    In this help forum post, filters were offered to hide or suppress the notifications:

    https://wordpress.org/support/topic/cant-disable-seo-warning-about-deleted-posts/

    That said, in Yoast 21.5, I cannot find the filters in the code to determine which, if any, arguments are passed to the function to granularly determine if the notification should be suppressed. A review of class-slug-change-watcher.php found where these notifications are enqueued and in that and class Yoast_Notification there are no filters or actions to prevent this notifications.

    Question 1: is the answer on the above linked help forum answer still valid in Yoast 21? If so, can the full documentation of the filter be provided and/or location in the code referenced, and can a third-party developer granularly disable notifications for post types they create?

    Question 2: if not, can developers please given a way to granularly disable notifications for post types they create?

    Thank you.

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

    (@maybellyne)

    Hello Jeremy,

    Thanks for using the Yoast SEO. Here’s the documentation on how to disable redirect notifications.

    Do let us know how it goes.

    Thread Starter Jeremy Scott

    (@jeremyescott)

    Thanks for the link to your documentation.

    Having reviewed these filters, they aren’t quite where they need to be to allow a user or developer granular control over these behaviors and notifications of the redirect watcher.

    As a developer, I want to disable these for only a single post type, and the filters work in an all-or-nothing fashion. It would be much nicer to have that level of granular control, and if the filters accepted arguments with post data or post type, I could do that. Can you please pass along that feedback.

    I did find a work-around, by using the filter: Yoast\WP\SEO\automatic_redirection_post_types but that disabled the entire system for the post type, which for me made sense, but may not make sense to others.

    Thanks for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable Post Trashed/Deleted/Slug Change Notifications’ is closed to new replies.