Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("Undefined array key 0").
Previous exceptions
  • Undefined array key 0 (2)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("Undefined array key 0")." Stacktrace: #30 Twig\Error\RuntimeError in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/themes/g5_helium/custom/views/partials/content-single-tourism-directory.html.twig:493 #29 Whoops\Exception\ErrorException in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/themes/g5_helium/custom/functions.php:277 #28 Gantry\Component\Whoops\SystemFacade:handleError in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/themes/g5_helium/custom/functions.php:277 #27 navigate_in_same_taxonomy in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Twig.php:296 #26 call_user_func_array in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Twig.php:296 #25 Timber\Twig:exec_function in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/18/18a01f51c7a3b0664e29732fa9a38cc6d6d434a75d856fe473968013593de11d.php:1139 #24 __TwigTemplate_d7608e31a4e1e54f84bb910e0a4568fd8475df9a68ee377f960f8b64e810552c:block_content in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:214 #23 Twig\Template:displayBlock in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/18/18a01f51c7a3b0664e29732fa9a38cc6d6d434a75d856fe473968013593de11d.php:41 #22 __TwigTemplate_d7608e31a4e1e54f84bb910e0a4568fd8475df9a68ee377f960f8b64e810552c:doDisplay in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #21 Twig\Template:displayWithErrorHandling in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #20 Twig\Template:display in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/3f/3fb4a25c1e2da1384ac1be08713dc2ec7453f640fcee2d10f54f092e7f3a2e8e.php:68 #19 __TwigTemplate_4b2e5ad62b839efc74ec18daf1475401087b372e67cd10f859f9659ebcba06b7:block_content in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:214 #18 Twig\Template:displayBlock in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/6b/6be0863797899028af9692ba165ac7c5292be18a00562754a18d6740fa7e9425.php:55 #17 __TwigTemplate_bdf8d28c52fee31b60cbfdf89c729b6772c6b9d8f296b0f8f17d983c4fa61151:doDisplay in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #16 Twig\Template:displayWithErrorHandling in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #15 Twig\Template:display in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/0f/0fd3c7d9235c992308907aaa8924d14f44e78dc320c50fa0de2ac8e453afe910.php:36 #14 __TwigTemplate_f18387f3bf89af71d9607407a019958e74dbc852c898415a09e0e9d4ac9f4245:doDisplay in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #13 Twig\Template:displayWithErrorHandling in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #12 Twig\Template:display in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/3f/3fb4a25c1e2da1384ac1be08713dc2ec7453f640fcee2d10f54f092e7f3a2e8e.php:54 #11 __TwigTemplate_4b2e5ad62b839efc74ec18daf1475401087b372e67cd10f859f9659ebcba06b7:doDisplay in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #10 Twig\Template:displayWithErrorHandling in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #9 Twig\Template:display in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:432 #8 Twig\Template:render in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/TemplateWrapper.php:47 #7 Twig\TemplateWrapper:render in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Loader.php:79 #6 Timber\Loader:render in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:334 #5 Timber\Timber:compile in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:383 #4 Timber\Timber:fetch in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:410 #3 Timber\Timber:render in /var/www/vhosts/visitmitchell.com/httpdocs/wp-content/themes/g5_helium/single.php:35 #2 include in /var/www/vhosts/visitmitchell.com/httpdocs/wp-includes/template-loader.php:106 #1 require_once in /var/www/vhosts/visitmitchell.com/httpdocs/wp-blog-header.php:19 #0 require in /var/www/vhosts/visitmitchell.com/httpdocs/index.php:17
Stack frames (31)
30
Twig\Error\RuntimeError
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/themes/g5_helium/custom/views/partials/content-single-tourism-directory.html.twig493
29
Whoops\Exception\ErrorException
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/themes/g5_helium/custom/functions.php277
28
Gantry\Component\Whoops\SystemFacade handleError
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/themes/g5_helium/custom/functions.php277
27
navigate_in_same_taxonomy
/vendor/timber/timber/lib/Twig.php296
26
call_user_func_array
/vendor/timber/timber/lib/Twig.php296
25
Timber\Twig exec_function
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/18/18a01f51c7a3b0664e29732fa9a38cc6d6d434a75d856fe473968013593de11d.php1139
24
__TwigTemplate_d7608e31a4e1e54f84bb910e0a4568fd8475df9a68ee377f960f8b64e810552c block_content
/compat/vendor/twig/twig/src/Template.php214
23
Twig\Template displayBlock
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/18/18a01f51c7a3b0664e29732fa9a38cc6d6d434a75d856fe473968013593de11d.php41
22
__TwigTemplate_d7608e31a4e1e54f84bb910e0a4568fd8475df9a68ee377f960f8b64e810552c doDisplay
/compat/vendor/twig/twig/src/Template.php453
21
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
20
Twig\Template display
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/3f/3fb4a25c1e2da1384ac1be08713dc2ec7453f640fcee2d10f54f092e7f3a2e8e.php68
19
__TwigTemplate_4b2e5ad62b839efc74ec18daf1475401087b372e67cd10f859f9659ebcba06b7 block_content
/compat/vendor/twig/twig/src/Template.php214
18
Twig\Template displayBlock
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/6b/6be0863797899028af9692ba165ac7c5292be18a00562754a18d6740fa7e9425.php55
17
__TwigTemplate_bdf8d28c52fee31b60cbfdf89c729b6772c6b9d8f296b0f8f17d983c4fa61151 doDisplay
/compat/vendor/twig/twig/src/Template.php453
16
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
15
Twig\Template display
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/0f/0fd3c7d9235c992308907aaa8924d14f44e78dc320c50fa0de2ac8e453afe910.php36
14
__TwigTemplate_f18387f3bf89af71d9607407a019958e74dbc852c898415a09e0e9d4ac9f4245 doDisplay
/compat/vendor/twig/twig/src/Template.php453
13
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
12
Twig\Template display
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/cache/gantry5/g5_helium/twig/3f/3fb4a25c1e2da1384ac1be08713dc2ec7453f640fcee2d10f54f092e7f3a2e8e.php54
11
__TwigTemplate_4b2e5ad62b839efc74ec18daf1475401087b372e67cd10f859f9659ebcba06b7 doDisplay
/compat/vendor/twig/twig/src/Template.php453
10
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
9
Twig\Template display
/compat/vendor/twig/twig/src/Template.php432
8
Twig\Template render
/compat/vendor/twig/twig/src/TemplateWrapper.php47
7
Twig\TemplateWrapper render
/vendor/timber/timber/lib/Loader.php79
6
Timber\Loader render
/vendor/timber/timber/lib/Timber.php334
5
Timber\Timber compile
/vendor/timber/timber/lib/Timber.php383
4
Timber\Timber fetch
/vendor/timber/timber/lib/Timber.php410
3
Timber\Timber render
/var/www/vhosts/visitmitchell.com/httpdocs/wp-content/themes/g5_helium/single.php35
2
include
/var/www/vhosts/visitmitchell.com/httpdocs/wp-includes/template-loader.php106
1
require_once
/var/www/vhosts/visitmitchell.com/httpdocs/wp-blog-header.php19
0
require
/var/www/vhosts/visitmitchell.com/httpdocs/index.php17
                        <ul>
                        {% for item in meeting_amenities %}
                            <li>
                                {{ item.label }}
                            </li>
                        {% endfor %}
                        </ul>
                    </div>
                    {% endif %}
                </div>
            </section>
            {% endif %}
            {# End Meeting Details #}
        
 
            {# Begin Post Navigation #}
            <nav class="navigation post-navigation" aria-label="Listings">
                <h2 class="screen-reader-text">Listing navigation</h2>
                <div class="nav-links">
                    {{ fn('navigate_in_same_taxonomy', post)|raw }}
                </div>
            </nav>
            {# End Post Navigation #}
 
 
        {% else %}
 
            {# Begin Password Protected Form #}
            <div class="password-form">
 
                {# Include the password form #}
                {% include 'partials/password-form.html.twig' %}
 
            </div>
            {# End Password Protected Form #}
 
        {% endif %}
 
    {% endblock %}
 
            if ($parentID === 16) {
                break;
            }
            $list = '<span class="term">' . $parent->name . '</span>  <i class="fa-thin fa-angle-right"></i>' . $list;
            $parentID = $parent->parent;
        }
        $url = "/" . $type . "/" . $primaryCAT->slug;
        $list = $list . '<span class="term">' . $primaryCAT->name . '</span>';
    }
 
    return $list;
}
 
// Navigate in same taxonomy
 
function navigate_in_same_taxonomy($post) {
    $post_id = $post->ID; // current post ID
    $cat = wp_get_object_terms($post_id, 'directory-category', array('childless' => 'true'));
 
    $currentTermName = $cat[0]->name; // current category ID
 
    $args = array(
        'post_type' => 'tourism-directory',           // Change to your custom post type if needed
        'posts_per_page' => -1,                       // Number of posts to display (-1 for all)
        'orderby' => 'title',
        'order' => 'ASC',
        'tax_query' => array(
            array(
                'taxonomy' => 'directory-category',  // Replace with your actual taxonomy name
                'field' => 'slug',              // You can use 'id', 'slug', or 'name'
                'terms' => $currentTermName,    // Replace with the slug of the specific term
            ),
        ),
    );
    $posts = get_posts($args);
 
    // get IDs of posts retrieved from get_posts
    $ids = array();
    foreach ($posts as $thepost) {
        $ids[] = $thepost->ID;
Exception message: Undefined array key 0
            if ($parentID === 16) {
                break;
            }
            $list = '<span class="term">' . $parent->name . '</span>  <i class="fa-thin fa-angle-right"></i>' . $list;
            $parentID = $parent->parent;
        }
        $url = "/" . $type . "/" . $primaryCAT->slug;
        $list = $list . '<span class="term">' . $primaryCAT->name . '</span>';
    }
 
    return $list;
}
 
// Navigate in same taxonomy
 
function navigate_in_same_taxonomy($post) {
    $post_id = $post->ID; // current post ID
    $cat = wp_get_object_terms($post_id, 'directory-category', array('childless' => 'true'));
 
    $currentTermName = $cat[0]->name; // current category ID
 
    $args = array(
        'post_type' => 'tourism-directory',           // Change to your custom post type if needed
        'posts_per_page' => -1,                       // Number of posts to display (-1 for all)
        'orderby' => 'title',
        'order' => 'ASC',
        'tax_query' => array(
            array(
                'taxonomy' => 'directory-category',  // Replace with your actual taxonomy name
                'field' => 'slug',              // You can use 'id', 'slug', or 'name'
                'terms' => $currentTermName,    // Replace with the slug of the specific term
            ),
        ),
    );
    $posts = get_posts($args);
 
    // get IDs of posts retrieved from get_posts
    $ids = array();
    foreach ($posts as $thepost) {
        $ids[] = $thepost->ID;
        if ( is_array($arr) ) {
            return $arr;
        }
        $arr = array($arr);
        return $arr;
    }
 
    /**
     *
     *
     * @param string  $function_name
     * @return mixed
     */
    public function exec_function( $function_name ) {
        $args = func_get_args();
        array_shift($args);
        if ( is_string($function_name) ) {
            $function_name = trim($function_name);
        }
        return call_user_func_array($function_name, ($args));
    }
 
    /**
     *
     *
     * @param string  $content
     * @return string
     */
    public function twig_pretags( $content ) {
        return preg_replace_callback('|<pre.*>(.*)</pre|isU', array(&$this, 'convert_pre_entities'), $content);
    }
 
    /**
     *
     *
     * @param array   $matches
     * @return string
     */
    public function convert_pre_entities( $matches ) {
        return str_replace($matches[1], htmlentities($matches[1]), $matches[0]);
        if ( is_array($arr) ) {
            return $arr;
        }
        $arr = array($arr);
        return $arr;
    }
 
    /**
     *
     *
     * @param string  $function_name
     * @return mixed
     */
    public function exec_function( $function_name ) {
        $args = func_get_args();
        array_shift($args);
        if ( is_string($function_name) ) {
            $function_name = trim($function_name);
        }
        return call_user_func_array($function_name, ($args));
    }
 
    /**
     *
     *
     * @param string  $content
     * @return string
     */
    public function twig_pretags( $content ) {
        return preg_replace_callback('|<pre.*>(.*)</pre|isU', array(&$this, 'convert_pre_entities'), $content);
    }
 
    /**
     *
     *
     * @param array   $matches
     * @return string
     */
    public function convert_pre_entities( $matches ) {
        return str_replace($matches[1], htmlentities($matches[1]), $matches[0]);
                    ";
                }
                // line 483
                echo "                </div>
            </section>
            ";
            }
            // line 486
            echo "            ";
            // line 487
            echo "        
 
            ";
            // line 490
            echo "            <nav class=\"navigation post-navigation\" aria-label=\"Listings\">
                <h2 class=\"screen-reader-text\">Listing navigation</h2>
                <div class=\"nav-links\">
                    ";
            // line 493
            echo call_user_func_array($this->env->getFunction('fn')->getCallable(), ["navigate_in_same_taxonomy", ($context["post"] ?? null)]);
            echo "
                </div>
            </nav>
            ";
            // line 497
            echo "
 
        ";
        } else {
            // line 500
            echo "
            ";
            // line 502
            echo "            <div class=\"password-form\">
 
                ";
            // line 505
            echo "                ";
            $this->loadTemplate("partials/password-form.html.twig", "partials/content-single-tourism-directory.html.twig", 505)->display($context);
            // line 506
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Exception $e) {
                $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
 
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        echo "<article class=\"post-type-";
        echo $this->getAttribute(($context["post"] ?? null), "post_type", []);
        echo " ";
        echo $this->getAttribute(($context["post"] ?? null), "class", []);
        echo "\" id=\"post-";
        echo $this->getAttribute(($context["post"] ?? null), "ID", []);
        echo "\">
 
    ";
        // line 3
        $this->displayBlock('content', $context, $blocks);
        // line 513
        echo "
</article>
";
    }
 
    // line 3
    public function block_content($context, array $blocks = [])
    {
        // line 4
        echo "
        ";
        // line 6
        echo "        ";
        if ( !call_user_func_array($this->env->getFunction('function')->getCallable(), ["post_password_required", $this->getAttribute(($context["post"] ?? null), "ID", [])])) {
            // line 7
            echo "            ";
            // line 8
            echo "            <section class=\"header-details full-width\">
                <div class=\"header-details-content\">
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
            // line 12
            $context["scopeFile"] = "single";
        }
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "single.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 15
    public function block_content($context, array $blocks = [])
    {
        // line 16
        echo "
    <div class=\"platform-content\">
        <div class=\"content-wrapper\">
            <section class=\"entry\">
 
                ";
        // line 21
        $this->loadTemplate([0 => (("partials/content-" . ($context["scopeFile"] ?? null)) . ".html.twig"), 1 => "partials/content.html.twig"], "single.html.twig", 21)->display($context);
        // line 22
        echo "
            </section>
        </div> <!-- /content-wrapper -->
    </div>
 
";
    }
 
    public function getTemplateName()
    {
        return "single.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
    }
 
    public function getDebugInfo()
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Exception $e) {
                $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "debugger", []), "startTimer", [0 => "render", 1 => "Rendering page"], "method");
        // line 2
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "setLayout", [], "method");
        // line 3
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "loadAtoms", [], "method");
        // line 4
        $context["segments"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "segments", [], "method");
        // line 6
        ob_start(function () { return ''; });
        // line 7
        echo "    ";
        if ($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "hasContent", [], "method")) {
            // line 8
            echo "        ";
            $this->displayBlock('content', $context, $blocks);
            // line 10
            echo "    ";
        }
        $context["content"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 13
        $context["offcanvas"] = null;
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["segments"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
            // line 15
            echo "    ";
            if (($this->getAttribute($context["segment"], "type", []) == "offcanvas")) {
                // line 16
                $context["offcanvas"] = $context["segment"];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['segment'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'page_head' => [$this, 'block_page_head'],
            'page_footer' => [$this, 'block_page_footer'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page.html.twig", "partials/page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_page_head($context, array $blocks = [])
    {
        // line 4
        if (($context["page_head"] ?? null)) {
            // line 5
            echo "        ";
            echo ($context["page_head"] ?? null);
            echo "
    ";
        } else {
            // line 7
            echo "        ";
            $this->displayParentBlock("page_head", $context, $blocks);
            echo "
    ";
        }
    }
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
        $context["twigTemplate"] = "single.html.twig";
        // line 3
        $context["scope"] = "single";
        // line 5
        if (call_user_func_array($this->env->getFunction('fn')->getCallable(), ["is_singular", "tourism-directory"])) {
            // line 6
            $context["scopeFile"] = "single-tourism-directory";
        } elseif (call_user_func_array($this->env->getFunction('fn')->getCallable(), ["is_singular", "ad-landing"])) {
            // line 8
            $context["scopeFile"] = "single-adlanding";
        } elseif (call_user_func_array($this->env->getFunction('fn')->getCallable(), ["is_singular", "post"])) {
            // line 10
            $context["scopeFile"] = "single-post";
        } else {
            // line 12
            $context["scopeFile"] = "single";
        }
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "single.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 15
    public function block_content($context, array $blocks = [])
    {
        // line 16
        echo "
    <div class=\"platform-content\">
        <div class=\"content-wrapper\">
            <section class=\"entry\">
 
                ";
        // line 21
        $this->loadTemplate([0 => (("partials/content-" . ($context["scopeFile"] ?? null)) . ".html.twig"), 1 => "partials/content.html.twig"], "single.html.twig", 21)->display($context);
        // line 22
        echo "
            </section>
        </div> <!-- /content-wrapper -->
    </div>
 
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
 
        $key = null;
        $output = false;
        if ( false !== $expires ) {
            ksort($data);
            $key = md5($file.json_encode($data));
            $output = $this->get_cache($key, self::CACHEGROUP, $cache_mode);
        }
 
        if ( false === $output || null === $output ) {
            $twig = $this->get_twig();
            if ( strlen($file) ) {
                $loader = $this->get_loader();
                $result = $loader->getCacheKey($file);
                do_action('timber_loader_render_file', $result);
            }
            $data = apply_filters('timber_loader_render_data', $data);
            $data = apply_filters('timber/loader/render_data', $data, $file);
            $template = $twig->load($file);
            $output = $template->render($data);
        }
 
        if ( false !== $output && false !== $expires && null !== $key ) {
            $this->delete_cache();
            $this->set_cache($key, $output, self::CACHEGROUP, $expires, $cache_mode);
        }
        $output = apply_filters('timber_output', $output);
        return apply_filters('timber/output', $output, $data, $file);
    }
 
    protected function delete_cache() {
        Cleaner::delete_transients();
    }
 
    /**
     * Get first existing template.
     *
     * @param array|string $templates  Name(s) of the Twig template(s) to choose from.
     * @return string|bool             Name of chosen template, otherwise false.
     */
        if ( $via_render ) {
            $file = apply_filters('timber_render_file', $file);
        } else {
            $file = apply_filters('timber_compile_file', $file);
        }
 
        $output = false;
 
        if ($file !== false) {
            if ( is_null($data) ) {
                $data = array();
            }
 
            if ( $via_render ) {
                $data = apply_filters('timber_render_data', $data);
            } else {
                $data = apply_filters('timber_compile_data', $data);
            }
 
            $output = $loader->render($file, $data, $expires, $cache_mode);
        } else {
            if ( is_array($filenames) ) {
                $filenames = implode(", ", $filenames);
            }
            Helper::error_log( 'Error loading your template files: '.$filenames.'. Make sure one of these files exists.' );
        }
 
        do_action('timber_compile_done');
        return $output;
    }
 
    /**
     * Compile a string.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
        $twig = $dummy_loader->get_twig();
        $template = $twig->createTemplate($string);
        return $template->render($data);
    }
 
    /**
     * Fetch function.
     *
     * @api
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                 array, the first value is used for non-logged in visitors, the second for users.
     *                                 Default false.
     * @param string       $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
     * @return bool|string The returned output.
     */
    public static function fetch( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::compile($filenames, $data, $expires, $cache_mode, true);
        $output = apply_filters('timber_compile_result', $output);
        return $output;
    }
 
    /**
     * Render function.
     *
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                 array, the first value is used for non-logged in visitors, the second for users.
     *                                 Default false.
     * @param string       $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
     * @return bool|string The echoed output.
     */
    public static function render( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::fetch($filenames, $data, $expires, $cache_mode);
        echo $output;
        return $output;
    }
 
    /**
     * Render a string with Twig variables.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
     *
     * Timber::render_string( 'Hi {{ username }}, I’m a string with a custom Twig variable', $data );
     * ```
     * @param string $string A string with Twig variables.
     * @param array  $data   An array of data to use in Twig template.
     * @return bool|string
     */
use Timber\Timber;
 
/*
 * The Template for displaying all single posts
 */
 
$gantry = Gantry::instance();
 
/** @var Theme $theme */
$theme  = $gantry['theme'];
 
// We need to render contents of <head> before plugin content gets added.
$context              = Timber::get_context();
$context['page_head'] = $theme->render('partials/page_head.html.twig', $context);
 
$post            = Timber::query_post();
$context['post'] = $post;
$context['wp_title'] .= ' - ' . $post->title();
 
Timber::render(['single-' . $post->ID . '.html.twig', 'single-' . $post->post_type . '.html.twig', 'single.html.twig'], $context);
 
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
Key Value
simplefavorites []
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /plains-commerce-bank-community-room/
USER visitmitchell.tdgweb_xksyyft6b2g
HOME /var/www/vhosts/visitmitchell.com
SCRIPT_NAME /index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /plains-commerce-bank-community-room/
REMOTE_PORT 54146
SCRIPT_FILENAME /var/www/vhosts/visitmitchell.com/httpdocs/index.php
SERVER_ADMIN root@localhost
CONTEXT_DOCUMENT_ROOT /var/www/vhosts/visitmitchell.com/httpdocs
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /var/www/vhosts/visitmitchell.com/httpdocs
REMOTE_ADDR 18.97.9.175
SERVER_PORT 443
SERVER_ADDR 192.168.100.237
SERVER_NAME www.visitmitchell.com
SERVER_SIGNATURE
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_CF_CONNECTING_IP 18.97.9.175
HTTP_CF_IPCOUNTRY US
HTTP_CF_VISITOR {\"scheme\":\"https\"}
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_X_FORWARDED_PROTO https
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT_ENCODING gzip, br
HTTP_CDN_LOOP cloudflare; loops=1
HTTP_CF_RAY 9276f35c7aec29bc-IAD
HTTP_CONNECTION close
HTTP_X_FORWARDED_FOR 18.97.9.175
HTTP_X_REAL_IP 18.97.9.175
HTTP_HOST www.visitmitchell.com
proxy-nokeepalive 1
HTTPS on
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY 0
PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY 0
PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
HTTP_AUTHORIZATION
SCRIPT_URI https://www.visitmitchell.com/plains-commerce-bank-community-room/
SCRIPT_URL /plains-commerce-bank-community-room/
UNIQUE_ID Z-aOrYiisCtb83a1pt2mNQAAA4Q
REDIRECT_STATUS 200
REDIRECT_HTTPS on
REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY 0
REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY 0
REDIRECT_PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI https://www.visitmitchell.com/plains-commerce-bank-community-room/
REDIRECT_SCRIPT_URL /plains-commerce-bank-community-room/
REDIRECT_UNIQUE_ID Z-aOrYiisCtb83a1pt2mNQAAA4Q
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1743163053.5414
REQUEST_TIME 1743163053
empty
0. Whoops\Handler\PrettyPageHandler