wp_after_load_template

动作钩子
do_action( 'wp_after_load_template', $_template_file, $require_once, $args )
参数
  • (string) $_template_file The full path to the template file.
    Required:
  • (bool) $require_once Whether to require_once or require.
    Required:
  • (array) $args Additional arguments passed to the template.
    Required:
定义位置
相关勾子
wp_before_load_templateget_block_templatepre_get_block_templateget_block_templatespre_get_block_templates
相关方法
load_templatewp_enable_block_templateswp_underscore_audio_templatewp_maybe_load_embedswp_print_update_row_templatesget_date_template
引入
6.1.0
弃用
-

wp_after_load_template:加载并执行请求的模板后,将在 WordPress 中触发此操作钩子。它允许开发人员在模板加载后添加额外的处理或修改。这对于添加自定义数据、更改模板输出或向页面添加其他内容很有用。

在加载一个模板文件后触发。

do_action( 'wp_after_load_template', $_template_file, $require_once, $args );

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-14 12:36:31

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

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

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