setting link based on page title
-
I am running a school blog and and attempting to link to each department’s blog entries from their department page. So far I am simply using the $the_title tag to link to the page I want: a href=”https://mywebsite.com/author/<?php the_title(); ?>. The only issue with this is that in a few cases the title has a space in it (ie: social science), but the author/username has no spaces. Can someone suggest how I would go about fixing this for the few departments this is affecting?
Thanks for your time.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘setting link based on page title’ is closed to new replies.