wp_robots

过滤钩子
apply_filters( 'wp_robots', array()
参数
  • (array) $robots Associative array of directives. Every key must be the name of the directive, and the corresponding value must either be a string to provide as value for the directive or a boolean `true` if it is a boolean directive, i.e. without a value.
    Required:
定义位置
相关勾子
do_robotswp_footerwp_logoutwpmu_optionswpmu_drop_tables
相关方法
wp_robotswp_no_robotsdo_robotsis_robotswp_roleswp_robots_noindex
引入
5.7.0
弃用
-

wp_robots:这是一个 WordPress 函数,用于生成 robots.txt 文件。这个文件可以告诉搜索引擎爬虫那些页面可以抓取,那些页面不可以抓取。生成的 robots.txt 文件通常存储在网站根目录中,可以通过向网站根目录 URL 添加 /robots.txt 访问。

过滤要包含在’robots’元标签中的指令。

元标签将只在必要时被包含。

$robots = apply_filters( 'wp_robots', array() );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 19:32:59

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: