TypeError
Timber\Term::__toString(): Return value must be of type string, null returned TypeError thrown with message "Timber\Term::__toString(): Return value must be of type string, null returned" Stacktrace: #24 TypeError in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/timber/timber/lib/Term.php:82 #23 Timber\Term:__toString in /var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/4c/4c97b26d52f47d763964a6baee862bf3.php:72 #22 __TwigTemplate_7c4c4d3c6300908f1e331a2afbc34aa1:block_content in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:182 #21 Twig\Template:displayBlock in /var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/30/30bf477cf43659d49020be3635f9ea3e.php:62 #20 __TwigTemplate_9574bd0aaf9840cd734cea3a877a020e:doDisplay in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:405 #19 Twig\Template:displayWithErrorHandling in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:378 #18 Twig\Template:display in /var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/e5/e5601a5874a378ffc7b58a8a9b94e20a.php:43 #17 __TwigTemplate_dc7f7c59196f2221e4d61e4301a143cb:doDisplay in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:405 #16 Twig\Template:displayWithErrorHandling in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:378 #15 Twig\Template:display in /var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/4c/4c97b26d52f47d763964a6baee862bf3.php:45 #14 __TwigTemplate_7c4c4d3c6300908f1e331a2afbc34aa1:doDisplay in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:405 #13 Twig\Template:displayWithErrorHandling in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:378 #12 Twig\Template:display in /var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/6b/6b56a6a0cc148c9f963a65696adc982a.php:37 #11 __TwigTemplate_350daae0adc4ef27309ba0a93cc103e8:doDisplay in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:405 #10 Twig\Template:displayWithErrorHandling in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:378 #9 Twig\Template:display in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/Template.php:390 #8 Twig\Template:render in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/twig/twig/src/TemplateWrapper.php:45 #7 Twig\TemplateWrapper:render in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/timber/timber/lib/Loader.php:79 #6 Timber\Loader:render in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:334 #5 Timber\Timber:compile in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:383 #4 Timber\Timber:fetch in /var/www/mapitout.com/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:410 #3 Timber\Timber:render in /var/www/mapitout.com/wp-content/themes/g5_fiftyfoot_child/archive.php:73 #2 include in /var/www/mapitout.com/wp-includes/template-loader.php:125 #1 require_once in /var/www/mapitout.com/wp-blog-header.php:19 #0 require in /var/www/mapitout.com/index.php:17
Stack frames (25)
24
TypeError
/vendor/timber/timber/lib/Term.php82
23
Timber\Term __toString
/var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/4c/4c97b26d52f47d763964a6baee862bf3.php72
22
__TwigTemplate_7c4c4d3c6300908f1e331a2afbc34aa1 block_content
/vendor/twig/twig/src/Template.php182
21
Twig\Template displayBlock
/var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/30/30bf477cf43659d49020be3635f9ea3e.php62
20
__TwigTemplate_9574bd0aaf9840cd734cea3a877a020e doDisplay
/vendor/twig/twig/src/Template.php405
19
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php378
18
Twig\Template display
/var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/e5/e5601a5874a378ffc7b58a8a9b94e20a.php43
17
__TwigTemplate_dc7f7c59196f2221e4d61e4301a143cb doDisplay
/vendor/twig/twig/src/Template.php405
16
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php378
15
Twig\Template display
/var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/4c/4c97b26d52f47d763964a6baee862bf3.php45
14
__TwigTemplate_7c4c4d3c6300908f1e331a2afbc34aa1 doDisplay
/vendor/twig/twig/src/Template.php405
13
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php378
12
Twig\Template display
/var/www/mapitout.com/wp-content/cache/gantry5/g5_fiftyfoot_child/twig/6b/6b56a6a0cc148c9f963a65696adc982a.php37
11
__TwigTemplate_350daae0adc4ef27309ba0a93cc103e8 doDisplay
/vendor/twig/twig/src/Template.php405
10
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php378
9
Twig\Template display
/vendor/twig/twig/src/Template.php390
8
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php45
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/mapitout.com/wp-content/themes/g5_fiftyfoot_child/archive.php73
2
include
/var/www/mapitout.com/wp-includes/template-loader.php125
1
require_once
/var/www/mapitout.com/wp-blog-header.php19
0
require
/var/www/mapitout.com/index.php17
 
    /**
     * @param int $tid
     * @param string $tax
     */
    public function __construct( $tid = null, $tax = '' ) {
        if ( $tid === null ) {
            $tid = $this->get_term_from_query();
        }
        if ( strlen($tax) ) {
            $this->taxonomy = $tax;
        }
        $this->init($tid);
    }
 
    /**
     * @return string
     */
    public function __toString() {
        return $this->name;
    }
 
    /**
     * @param $tid
     * @param $taxonomy
     *
     * @return static
     */
    public static function from( $tid, $taxonomy ) {
        if ( is_array($tid) ) {
            return array_map( function($term) use ($taxonomy) {
                return new static($term, $taxonomy);
            }, $tid);
        }
        return new static($tid, $taxonomy);
    }
 
 
    /* Setup
    ===================== */
        echo "
    <div id=\"mapitout_top\"></div>
 
\t<div class=\"platform-advertisers-content\">
\t\t<div class=\"advertisers-archive\">
 
            
 
\t\t\t";
        // line 13
        if ( !twig_test_empty(($context["posts"] ?? null))) {
            // line 14
            echo "
\t\t\t\t<div id=\"adv-categories\" class=\"ff-advertiser-categories g-grid bg-color-4\">
\t\t\t\t\t<div class=\"g-block size-33 ff-advertiser-wheretogo visible-desktop\">
\t\t\t\t\t\t<h3 class=\"uppercase h5-size font-base font-normal color-2\">Where to go</h3>
\t\t\t\t\t\t<div class=\"ff-advertiser-categories-locations center\">
\t\t\t\t\t\t\t<h4 class=\"uppercase color-2 h3-size line-height-1\">";
            // line 19
            echo ($context["current_term"] ?? null);
            echo ", Tx</h4>
\t\t\t\t\t\t\t<a href=\"/#places\" class=\"button h4-size\">Change my Destination</a>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
 
\t\t\t\t\t<div class=\"g-block size-5 ff-advertiser-divider\"></div>
                    
\t\t\t\t\t<div class=\"g-block size-62 ff-advertiser-whattodo\">
\t\t\t\t\t\t<h3 class=\"uppercase h5-size font-base font-normal color-2 visible-desktop\">What to do <a href=\"#\" id=\"ff-clearfilters\">(Clear Filters)</a><span class=\"h7-size\" style=\"float: right;\">Select what you are interested in</span></h3>
\t\t\t\t\t\t<div class=\"g-grid color-2\">
\t\t\t\t\t\t\t";
            // line 29
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["cats"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
                // line 30
                echo "\t\t\t\t\t\t\t\t<div class=\"g-block size-33-3 ff-advertiser-category-item uppercase\">
\t\t\t\t\t\t\t\t\t<a class=\"ff-advertiser-category-filter\" href=\"#\" data-category=\"";
                // line 31
                echo twig_get_attribute($this->env, $this->source, $context["category"], "slug", [], "any", false, false, false, 31);
    {
        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, $templateContext ?? $this);
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["gantry"] ?? null), "debugger", [], "any", false, false, false, 1), "startTimer", [0 => "render", 1 => "Rendering page"], "method", false, false, false, 1);
        // line 2
        twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["gantry"] ?? null), "theme", [], "any", false, false, false, 2), "setLayout", [], "method", false, false, false, 2);
        // line 3
        twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["gantry"] ?? null), "theme", [], "any", false, false, false, 3), "loadAtoms", [], "method", false, false, false, 3);
        // line 4
        $context["segments"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["gantry"] ?? null), "theme", [], "any", false, false, false, 4), "segments", [], "method", false, false, false, 4);
        // line 6
        ob_start(function () { return ''; });
        // line 7
        echo "\t";
        if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["gantry"] ?? null), "theme", [], "any", false, false, false, 7), "hasContent", [], "method", false, false, false, 7)) {
            // line 8
            echo "\t\t";
            $this->displayBlock('content', $context, $blocks);
            // line 10
            echo "\t";
        }
        $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"]) {
            if ((twig_get_attribute($this->env, $this->source, $context["segment"], "type", [], "any", false, false, false, 14) == "offcanvas")) {
                // line 15
                $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;
        // line 18
        ob_start(function () { return ''; });
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } 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 (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
 
        $this->source = $this->getSourceContext();
 
        $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 = [])
    {
        $macros = $this->macros;
        $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 = [])
    {
        $macros = $this->macros;
        // 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 "
    ";
        }
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } 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 (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
 
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "partials/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 2
        $context["twigTemplate"] = "archive.html.twig";
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "advertisers.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 4
    public function block_content($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 5
        echo "
    <div id=\"mapitout_top\"></div>
 
\t<div class=\"platform-advertisers-content\">
\t\t<div class=\"advertisers-archive\">
 
            
 
\t\t\t";
        // line 13
        if ( !twig_test_empty(($context["posts"] ?? null))) {
            // line 14
            echo "
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } 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 (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
    private $source;
    private $macros = [];
 
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->source = $this->getSourceContext();
 
        $this->parent = false;
 
        $this->blocks = [
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        $this->loadTemplate([0 => "advertisers.html.twig"], "archive-advertisers.html.twig", 1)->display($context);
    }
 
    public function getTemplateName()
    {
        return "archive-advertisers.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
    }
 
    public function getDebugInfo()
    {
        return array (  37 => 1,);
    }
 
    public function getSourceContext()
    {
        return new Source("", "archive-advertisers.html.twig", "/var/www/mapitout.com/wp-content/themes/g5_fiftyfoot_child/views/archive-advertisers.html.twig");
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } 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 (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
    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 (\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());
            }
 
     * directly (use Twig\Environment::load() instead).
     *
     * @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
     */
    public function render(array $context = []): string
    {
        // 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_get_args()[1] ?? []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display(array $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_get_args()[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
     */
    array_unshift($templates, 'archive-' . get_post_type() . '.html.twig');
} else if ($current_term == 'cities') {
    //$context['title'] = post_type_archive_title('', false);
    $context['term'] = get_term_by( 'name', get_query_var('term'), $current_term );
    array_unshift($templates, 'taxonomy-cities.html.twig');
}
 
$context['get_post_type'] = get_post_type();
 
if($context['get_post_type'] == 'advertisers' || $current_term == 'cities'){
    $context['cats'] = Timber::get_terms('category_advertisers', array( 'hide_empty' => 1 ));
}
 
$context['posts'] = Timber::get_posts();
 
 
if(in_array(get_post_type(), ff_get_item_pages())){
    Timber::render( 'items.html.twig', $context );
}else{
    Timber::render($templates, $context);
}
 
 
 
    /**
     * 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 ) {
        /**
         * Fires immediately before including the template.
         *
         * @since 6.9.0
         *
         * @param string $template The path of the template about to be included.
         */
        do_action( 'wp_before_include_template', $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
ff_iso_seed 9a405245-3fe3-4604-9615-0692ca9f9c20
wpdiscuz_nonce_9feba367c49787a295e945d11c05d5d0 4f8a2976fa
empty
Key Value
SERVER_SOFTWARE nginx/1.28.0
REQUEST_URI /advertisers/
USER mapitout
HOME /home/mapitout
HTTP_COOKIE ff_iso_seed=9a405245-3fe3-4604-9615-0692ca9f9c20; wpdiscuz_nonce_9feba367c49787a295e945d11c05d5d0=4f8a2976fa
HTTP_X_FORWARDED_PROTO https
HTTP_CF_VISITOR {\"scheme\":\"https\"}
HTTP_CF_IPCOUNTRY US
HTTP_CF_CONNECTING_IP 216.73.216.132
HTTP_CDN_LOOP cloudflare; loops=1
HTTP_ACCEPT_ENCODING gzip, br
HTTP_CF_RAY 9d6eaa70aa59b179-CMH
HTTP_REFERER https://mapitout.com/advertisers
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_ACCEPT */*
HTTP_X_FORWARDED_FOR 216.73.216.132
HTTP_HOST mapitout.com
SCRIPT_FILENAME /var/www/mapitout.com/index.php
REDIRECT_STATUS 200
SERVER_NAME mapitout.com
SERVER_PORT 443
SERVER_ADDR 107.191.45.184
REMOTE_USER
REMOTE_PORT 13898
REMOTE_ADDR 216.73.216.132
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /var/www/mapitout.com
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1772604080.7631
REQUEST_TIME 1772604080
empty
0. Whoops\Handler\PrettyPageHandler