[英]how to use default wordpress header and footer in static html page
I have a wordpress website located "public_html" folder and I uploaded a static HTML page name facts.html to a new folder in public_html/nutritionfacts, let say its very simple like: I have a wordpress website located "public_html" folder and I uploaded a static HTML page name facts.html to a new folder in public_html/nutritionfacts, let say its very simple like:
<html> <body> <h1> FACTS </h1> </body> </html>
How can I add the default website header and footer to new static html page?如何将默认网站 header 和页脚添加到新的 static html 页面? and if I have 1000 static pages what is the best way to do it.如果我有 1000 个 static 页面,那么最好的方法是什么。
You need all those pages in.php extension add the following native function get_header
get_footer
on all those static pages and your header and footer will appear. You need all those pages in.php extension add the following native function get_header
get_footer
on all those static pages and your header and footer will appear.
facts.php事实。php
require '../../wp-load.php';
<?php get_header(); ?>
echo "<html>
<body>
<h1> FACTS </h1>
</body>
</html>";
<?php get_footer(); ?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.