In my .php file I use the following to return the category that my posts are in:
<?php echo single_cat_title(); ?>
The category title is then returned in my URL. HOWEVER, since my category is two words ("South Africa"), the URL reads: "south%20africa" instead of "southafrica".
I know that the "%20" is being inserted because urls cannot have breaks. Is there a way to edit the above <?php echo single_cat_title(); ?>
to return the category title but eliminate any breaks?