Do you want to create the functions or customize Auto Clean SEO Slugs in WordPress with by using simple code snippets, not any plugin? Then you land at the right place.
By default, WordPress has now the ability to remove some words from the page slug so it will clean the link and boost the SEO. But what if we want to exclude some words that are not automatically clean from slugs, Don’t worry this is the ultimate guide that will do it.
Below we have posted the simple code snippets and guide to use it, So you can use it to Auto Clean Slug of WordPress website, Just follow the below instruction carefully.
Auto Clean URL for SEO in WordPress
Below we have embedded the code snippets that will help you to automatically clean up the slug URL title by removing all unnecessary words. Just copy the code and paste it into your WordPress Theme’s functions.php file.
We have also extended the capabilities with additional customizations which hide the screen option for slug as well as the metabox. For customization, You just need to add some words which you don’t want to include in URL with this function
By including the code below, any new post you create will automatically get shortened and you will still have the ability to manually edit the slug by clicking on the URL under the post title and saving the post.
Code Snippets to Auto Clean WordPress Page & Post Slug
Add the additional code below to your theme’s functions.php file, it will remove/hide the slug option for the screen options dropdown as well as the metabox.
Code Snippets to Hide Slug Metabox & Slug Screen Option
Hope you guys successfully added some customization of slug page URL words and it’s working smooth. If you guys have any questions or opinion about this post, Please let us know in comment section. And don’t forget to share this guide on social media websites.