WordPress分期死亡白屏

时间:2020-07-24 14:35:19

标签: wordpress timber

我有一个WordPress页面,该页面在本地正常工作,但是部署到暂存后却破裂(白屏死机)。

我正在使用Timber / Twig。模板似乎是导致问题的原因,但是再说一次,如果模板是代码问题,为什么模板不会在本地抛出问题?

也许有人有见识。

<?php

/* Template Name: *** */

use Timber\Timber;
use Timber\PostQuery;
use Flynt\Utils\Options;

use const Flynt\Archives\POST_TYPES;

$context = Timber::get_context();

$context['banner'] = get_field('banner');
$context['status'] = get_field('status');
$context['resources'] = get_field('resources');
$context['information'] = get_field('information');

if (isset($_GET['contentOnly'])) {
    $context['contentOnly'] = true;
}

Timber::render('templates/events/***.twig', $context);

1 个答案:

答案 0 :(得分:0)

仅供参考,此问题是因为服务器区分大小写,如果发生这种情况,请注意这一点,请确保您的路径完全正确。

相关问题