Get url-friendly version of the_title? June 15, 2022 by Tarik Billa PHP has a function for url encoding that would probably work: urlencode( get_the_title() );