我想在标题中有一个图像。php可针对不同的页面进行更改。
标题中的函数。php如下所示:
if(is_archive()):
//change image to "Archives"
endif;
if(is_404()):
//change image to "404"
endif;
现在,是否可以检查页面是否为搜索页面,搜索字符串是什么,找到了多少帖子?所以我想做的基本上是:
if(is_search()):
//change image to "Search" AND echo %s
endif;
if(is_search_empty()): //yes I made this up
//change image to "Nothing found" AND echo $
endif;
甚至在搜索之外也有可能。php页面循环?