English Blog

How to Disable Yoast Automatic Redirects at premium

In this post I am gonna say how will you disable yoast redirects at premium with easy process. You might have installed yoast seo premium recently and found hazard with redirect option.

If you gonna publish a post you are seeing a small popup appear with very little time that cannot prevent to remove mark there. By the result your actual post URL gonna redirect with another. And that happened rearrange again and again.

Don’t worry! I have come here to provide solution you. I will tell you the method of disable yoast seo automatic redirects at premium way here.

Go to your theme about function.php and click on edit. At the bottom of all code just past these two filters below.

add_filter( 'wpseo_premium_post_redirect_slug_change', '__return_true' );

add_filter( 'wpseo_premium_term_redirect_slug_change', '__return_true' );

Disable redirect notifications

When you delete your site content, Yoast display a reminder notification to add a redirect to the removed item. Yoast SEO highly recommend adding redirects for removed items. However, you can disable this feature by adding the following code to your theme’s functions.php file. Please note that this only hides notification messages and therefore silent redirects may be created behind the scenes.

Posts or pages: Moved to Trash

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

Posts or pages: Changed URL

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

Taxonomies: Moved to Trash

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

Taxonomies: Changed URL

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

I hope you added these two filter. Now Clean your browser and theme cache. After go to an incognito mode and hit the affected url again and see its working correctly with actual url. I hope you have found the solve.

Thanks for coming here and reading the post. Stay keep in touch with ESujon and also our social media at facebook

Leave a Reply

Your email address will not be published.

Back to top button