So I'm using wordpress, and I'm in the index.php within my theme folder. basically what i want to do is create a URL based on what category the post is. so there's the_category(' ') which i figure will be used. but that returns the category as a link, and i need it as text. i then created a php file which redirects based on a search term within the URL. Here's an example: www.site.com/search.php?s=search term within php, how do i make it create a link from the category. here's what i want: www.site.com/search.php?s=the_category(' ') this obviously doesnt work, but is how i would want it to work.