On my search results template, I would like to display the term that was searched for. For example, if someone searches for 'computers' I want to show on the search results page:
Results for "computers":
What is the tag to show the term?
Thanks,
Jon
On my search results template, I would like to display the term that was searched for. For example, if someone searches for 'computers' I want to show on the search results page:
Results for "computers":
What is the tag to show the term?
Thanks,
Jon
<?php echo "$s"; ?> would probably do it.
This similar version is more secure:
<?php echo wp_specialchars($s); ?>
Works! Thank you!
How would I call out the Category name on the category.php template?
The 2nd solution works great. I used it in the header of the page. Neat. Thanks to mojorob and iridiax.
<?php single_cat_title(); ?>
This should do it with regards to the categories.
This topic has been closed to new replies.