Filter string like a slug
I have a WordPress site using pretty permalinks. I want to filter a string to that the it ends up with the exact same formatting as the url slug, does anyone know the filter or function to do so? 1 Answer 1 You can use sanitize_title() function: $string = “This is title string”; // return … Read more