我有一个目标网页。该页面包含标题,正文和页脚的总代码。我想将此代码显示为wordpress的首页。那我怎么能表现出来呢。请帮我解决这个问题
答案 0 :(得分:0)
只需将页面保存为index.html
即可。 (如果WordPress会覆盖它,请在index.html
文件中重写从index.php到.htaccess
的重定向。)
在.htaccess
文件中,您可以使用此功能;
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^https?://(www\.)?domain\.com [NC]
RewriteRule ^$ /index.html [L,R]
答案 1 :(得分:0)
你需要一个pagetemplate
它将通过其他样式/布局扩展您的模板或页面,如果您不包含wp_header / wp_footer,它将在页面模板中提供空白HTML或任何给定的HTML。
然后将您想要的域重定向到此页面。 这也将帮助你;)
https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/