我正在创建一个自定义WordPress主题, 并且我希望自己创建多个页面。创建第二个页面后, 在我将另一页面的模板更改为我创建的新页面之后, 主页现在显示为奇怪的中心对齐, body标记中的id = error-page。这些都不会对索引页产生影响。
我尝试将index.php复制到home.php, 但是索引页面仍然加载了奇怪的中心对齐, 并且在body标签中包含相同的id = error-page。该页面最初显示正常, 但是在为我试图创建的新页面添加页面模板后, 索引已更改。
这是我的index.php中的前几节, 显示我的代码应该正确:
<?php get_footer(); >
<!-- Background Video -->
<div class="video">
<div class="overlay"></div>
<video playsinline="playsinline" autoplay="autoplay" muted="muted" loop="loop">
<source src="<?php echo get_template_directory_uri(); ?>/videos/FFHPainVideo.mp4" type="video/mp4"/>
</video>
</div>
<!-- Hero Video Text -->
<div class="container h-100">
<div class="d-flex h-100 text-center align-items-center">
<div class="w-100 text-black">
<button type="button" class="btn btn-danger btn-circle btn-xl open"><i class="fa fa-play text-white" aria-hidden="true"></i></button>
<h1 class="display-3">Family First Healthcare</h1>
<h1 class="display-3">Pain Management</h1>
<p class="lead mb-0">An Athens Heart Center & Specialty Clinics Affiliate</p>
<button onclick="window.location.href = '#'; " type="button" class="btn btn-danger mt-3 px-4">Get Started Here ></button>
</div>
</div>
</div>
我希望页面在加载时是正常的, 但是加载资源失败:服务器响应的状态也为500。(索引):1错误。
以下是最新的服务器日志:
PHP Fatal error: Uncaught Error: Call to >undefined function
get_ssite_url() in /srv/htdocs/wp-content/themes/No
Phun/footer.php:18
Stack trace:
#0 /wordpress/core/5.2.3/wp-includes/template.php(722): require_once()
#1 /wordpress/core/5.2.3/wp-includes/template.php(671):
load_template('/srv/htdocs/wp-...', true)
#2 /wordpress/core/5.2.3/wp-includes/general-template.php(76): locate_template(Array, true)
#3 /srv/htdocs/wp-content/themes/No Phun/index.php(218): get_footer()
#4 /wordpress/core/5.2.3/wp-includes/template-loader.php(78): include('/srv/htdocs/wp-...')
#5 /wordpress/core/5.2.3/wp-blog-header.php(19): require_once('/wordpress/core...')
#6 /wordpress/core/5.2.3/index.php(17): require('/wordpress/core...')
#7 {main} thrown in /srv/htdocs/wp-content/themes/No Phun/footer.php on line 18
[05-Oct-2019 01:03:02 UTC] PHP Warning: session_start(): Cannot start session when headers already sent in /srv/htdocs/wp-content/plugins/wp-clone-template/main.php on line 119
[05-Oct-2019 01:06:19 UTC] PHP Warning: session_start(): Cannot start session when headers already sent in /srv/htdocs/wp-content/plugins/wp-clone-template/main.php on line 119
#1
阅读服务器日志后, 似乎很简单。在footer.php中, 似乎我有<?php get_ssite_url?>而不是<php get_site_url()?>。抱歉浪费大家的时间, 但是我很感谢查看服务器日志的建议。他们太痛苦了, 因为WordPress上托管的网站不允许FTP访问。
评论前必须登录!
注册