我有一个WordPress网站位于“ public_html”文件夹,我将一个静态HTML页面名称facts.html上传到了public_html / nutritionfacts中的新文件夹,可以说它非常简单,例如:
<html>
<body>
<h1> FACTS </h1>
</body>
</html>
如何将默认网站的页眉和页脚添加到新的静态html页面?如果我有1000个静态页面,什么是最好的方法?
您需要以.php扩展名的所有这些页面,在所有这些静态页面上添加以下本机函数get_header
get_hooter
。
facts.php
<?php get_header(); ?>
echo "<html>
<body>
<h1> FACTS </h1>
</body>
</html>";
<?php get_footer(); ?>