【发布时间】:2021-06-01 15:21:14
【问题描述】:
我想在我的 WordPress 页面 mydomain.com/plan 中包含 page_id = 25 :
<link rel="prefetch" href="/plan-both/ " as="document">
<link rel="prefetch" href="/plan-strategy/ " as="document">
<link rel="prefetch" href="/plan-funding/ " as="document">
根据this我们需要将它包含在header.php文件中:
<?php if(is_page(25)) { ?>
<link rel="prefetch" href="/plan-both/ " as="document">
<?php } ?>
问题:如果我包含在页面正文中,预取仍然有效吗?
这样我就可以将其包含在 WordPress 页面中,而不是编辑 header.php 文件。
【问题讨论】:
标签: html link-prefetch