WordPress输出搜索关键词标签:the_search_query

WordPress模板标签the_search_query用于输出搜索关键词,通常用在搜索表单和搜索结果页中。

the_search_query()

该函数没有任何参数,直接调用即可。

函数使用示例

<form method="get" id="searchform" action="/">
	
<input type="text" value="" name="s" id="s" />

扩展阅读

the_search_query()函数位于:wp-includes/general-template.php

相关函数:

  • get_search_query()

原创文章,作者:,如若转载,请注明出处:https://ce.771633.xyz/1657.html

Like (0)
Previous 2025年3月8日
Next 2025年3月8日

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注