如果您想要的是一个完整的页面刷新,那么您根本不需要ajax和插入htt-equip
html meta可以做到这一点
<meta http-equiv="refresh" content="5" >
(内容是以秒为单位的时间IIRC)
你只要抓住机会wp_head
并将其插入。
function wpse_228671_wp_head() {
echo \'<meta http-equiv="refresh" content="5" >\';
}
add_action(\'wp_head\',\'wpse_228671_wp_head\');