Error
Class 'DOMDocument' not found Error thrown with message "Class 'DOMDocument' not found" Stacktrace: #20 Error in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/classes/Gantry/Component/Twig/TwigExtension.php:518 #19 Gantry\Component\Twig\TwigExtension:parseAssetsFunc in /home/autodrom/public_html/offroad/wp-content/cache/gantry5/g5_hydrogen/twig/fd/fd1bdf0f0f3fc0341b3edb99fe7faddb63e21b692eaa0494141d8784c6b630a8.php:65 #18 __TwigTemplate_20a15897cdf936f0f85034cc03cb584bc32d300c08329bca4f17b324987965a1:doDisplay in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #17 Twig\Template:displayWithErrorHandling in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #16 Twig\Template:display in /home/autodrom/public_html/offroad/wp-content/cache/gantry5/g5_hydrogen/twig/21/21ef2b9d7443bccd50738f6bb165f2d230a01bfbf99bb106f332fc0b19cacec8.php:38 #15 __TwigTemplate_ba97f1f7b34d47fdb5e9effeab3dce57f9e29005f7565574a1074e8cc4b3a14b:doDisplay in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #14 Twig\Template:displayWithErrorHandling in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #13 Twig\Template:display in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:434 #12 Twig\Template:render in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/TemplateWrapper.php:47 #11 Twig\TemplateWrapper:render in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Environment.php:384 #10 Twig\Environment:render in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:141 #9 Gantry\Framework\Theme:render in /home/autodrom/public_html/offroad/wp-content/themes/g5_hydrogen/header.php:25 #8 require_once in /home/autodrom/public_html/offroad/wp-includes/template.php:730 #7 load_template in /home/autodrom/public_html/offroad/wp-includes/template.php:676 #6 locate_template in /home/autodrom/public_html/offroad/wp-includes/general-template.php:48 #5 get_header in /home/autodrom/public_html/offroad/wp-content/plugins/woocommerce/templates/archive-product.php:20 #4 include in /home/autodrom/public_html/offroad/wp-content/plugins/woocommerce/includes/wc-core-functions.php:345 #3 wc_get_template in /home/autodrom/public_html/offroad/wp-content/plugins/woocommerce/templates/taxonomy-product-cat.php:22 #2 include in /home/autodrom/public_html/offroad/wp-includes/template-loader.php:106 #1 require_once in /home/autodrom/public_html/offroad/wp-blog-header.php:19 #0 require in /home/autodrom/public_html/offroad/index.php:17
Stack frames (21)
20
Error
/classes/Gantry/Component/Twig/TwigExtension.php518
19
Gantry\Component\Twig\TwigExtension parseAssetsFunc
/home/autodrom/public_html/offroad/wp-content/cache/gantry5/g5_hydrogen/twig/fd/fd1bdf0f0f3fc0341b3edb99fe7faddb63e21b692eaa0494141d8784c6b630a8.php65
18
__TwigTemplate_20a15897cdf936f0f85034cc03cb584bc32d300c08329bca4f17b324987965a1 doDisplay
/vendor/twig/twig/src/Template.php455
17
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
16
Twig\Template display
/home/autodrom/public_html/offroad/wp-content/cache/gantry5/g5_hydrogen/twig/21/21ef2b9d7443bccd50738f6bb165f2d230a01bfbf99bb106f332fc0b19cacec8.php38
15
__TwigTemplate_ba97f1f7b34d47fdb5e9effeab3dce57f9e29005f7565574a1074e8cc4b3a14b doDisplay
/vendor/twig/twig/src/Template.php455
14
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
13
Twig\Template display
/vendor/twig/twig/src/Template.php434
12
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php47
11
Twig\TemplateWrapper render
/vendor/twig/twig/src/Environment.php384
10
Twig\Environment render
/classes/Gantry/Framework/Theme.php141
9
Gantry\Framework\Theme render
/home/autodrom/public_html/offroad/wp-content/themes/g5_hydrogen/header.php25
8
require_once
/home/autodrom/public_html/offroad/wp-includes/template.php730
7
load_template
/home/autodrom/public_html/offroad/wp-includes/template.php676
6
locate_template
/home/autodrom/public_html/offroad/wp-includes/general-template.php48
5
get_header
/home/autodrom/public_html/offroad/wp-content/plugins/woocommerce/templates/archive-product.php20
4
include
/home/autodrom/public_html/offroad/wp-content/plugins/woocommerce/includes/wc-core-functions.php345
3
wc_get_template
/home/autodrom/public_html/offroad/wp-content/plugins/woocommerce/templates/taxonomy-product-cat.php22
2
include
/home/autodrom/public_html/offroad/wp-includes/template-loader.php106
1
require_once
/home/autodrom/public_html/offroad/wp-blog-header.php19
0
require
/home/autodrom/public_html/offroad/index.php17
     * @param string $input
     * @param string $location
     * @param int $priority
     * @return string
     */
    public function parseAssetsFunc($input, $location = 'head', $priority = 0)
    {
        if ($location === 'head') {
            $scope = 'head';
            $html = "<!doctype html>\n<html><head>{$input}</head><body></body></html>";
        } else {
            $scope = 'body';
            $html = "<!doctype html>\n<html><head></head><body>{$input}</body></html>";
        }
 
        libxml_clear_errors();
 
        $internal = libxml_use_internal_errors(true);
 
        $doc = new \DOMDocument();
        $doc->loadHTML($html);
        foreach (libxml_get_errors() as $error) {
            $this->dealXmlError($error, $html);
        }
 
        libxml_clear_errors();
 
        libxml_use_internal_errors($internal);
 
        $raw = [];
        /** @var \DomElement $element */
        foreach ($doc->getElementsByTagName($scope)->item(0)->childNodes as $element) {
            if (empty($element->tagName)) {
                continue;
            }
            $result = ['tag' => $element->tagName, 'content' => $element->textContent];
            foreach ($element->attributes as $attribute) {
                $result[$attribute->name] = $attribute->value;
            }
            $success = Gantry::instance()['document']->addHeaderTag($result, $location, (int) $priority);
            throw new UnexpectedValueException('{% scripts with x %}: x is not an array');
        }
        $location = "head";
        if ($location && !is_string($location)) {
            throw new UnexpectedValueException('{% scripts in x %}: x is not a string');
        }
        $priority = isset($assetVariables['priority']) ? $assetVariables['priority'] : 0;
        ob_start();
        // line 5
        echo "    ";
        $this->displayBlock('head_stylesheets', $context, $blocks);
        // line 15
        $this->displayBlock('head_platform', $context, $blocks);
        // line 16
        echo "
    ";
        // line 17
        $this->displayBlock('head_overrides', $context, $blocks);
        $content = ob_get_clean();
        $assetFunction($content, $location, $priority);
        // line 24
        echo "<head>
    ";
        // line 25
        echo twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "document", []), "getHtml", [0 => "head_top"], "method"), "
    ");
        echo "
    ";
        // line 26
        $this->displayBlock('head_meta', $context, $blocks);
        // line 52
        $this->displayBlock('head_title', $context, $blocks);
        // line 56
        echo "
    ";
        // line 57
        $this->displayBlock('head_application', $context, $blocks);
        // line 61
        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) {
        parent::__construct($env);
 
        $this->blocks = [
            'head_title' => [$this, 'block_head_title'],
            'head_application' => [$this, 'block_head_application'],
            'head_platform' => [$this, 'block_head_platform'],
            'head' => [$this, 'block_head'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page_head.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page_head.html.twig", "partials/page_head.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_head_title($context, array $blocks = [])
    {
        // line 4
        echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
        echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "charset", []), "html", null, true);
        echo "\" />
    <link rel=\"profile\" href=\"http://gmpg.org/xfn/11\" />
    <link rel=\"pingback\" href=\"";
        // line 6
        echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "pingback_url", []), "html", null, true);
        echo "\" />";
    }
 
    // line 9
    public function block_head_application($context, array $blocks = [])
    {
        // line 10
            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
     *
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function render($name, array $context = [])
    {
        return $this->load($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function display($name, array $context = [])
    {
        $this->load($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
 
    /**
     * @see AbstractTheme::render()
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        static $timberContext;
 
        if (!isset($timberContext)) {
            $timberContext = Timber::get_context();
        }
 
        // Include Gantry specific things to the context.
        $context = array_replace($timberContext, $context);
 
        return $this->renderer()->render($file, $context);
    }
 
    public function set_template_layout()
    {
        $assignments = new Assignments;
        $selected = $assignments->select();
 
        if (GANTRY_DEBUGGER) {
            \Gantry\Debugger::addMessage('Selecting outline (rules, matches, scores):', 'debug');
            \Gantry\Debugger::addMessage($assignments->getPage(), 'debug');
            \Gantry\Debugger::addMessage($assignments->matches(), 'debug');
            \Gantry\Debugger::addMessage($assignments->scores(), 'debug');
        }
 
        $this->setLayout($selected);
    }
 
    public function widgets_init()
    {
        $gantry = Gantry::instance();
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */
 
defined('ABSPATH') or die;
 
use Timber\Timber;
 
/*
 * Third party plugins that hijack the theme will call wp_head() to get the header template.
 * We use this to start our output buffer and render into the views/page-plugin.html.twig template in footer.php
 */
 
$gantry = Gantry\Framework\Gantry::instance();
$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);
 
$GLOBALS['timberContext'] = $context;
 
ob_start();
 
 
    if ( is_array( $wp_query->query_vars ) ) {
        /*
         * This use of extract() cannot be removed. There are many possible ways that
         * templates could depend on variables that it creates existing, and no way to
         * detect and deprecate it.
         *
         * Passing the EXTR_SKIP flag is the safest option, ensuring globals and
         * function variables cannot be overwritten.
         */
        // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
        extract( $wp_query->query_vars, EXTR_SKIP );
    }
 
    if ( isset( $s ) ) {
        $s = esc_attr( $s );
    }
 
    if ( $require_once ) {
        require_once $_template_file;
    } else {
        require $_template_file;
    }
}
 
function locate_template( $template_names, $load = false, $require_once = true, $args = array() ) {
    $located = '';
    foreach ( (array) $template_names as $template_name ) {
        if ( ! $template_name ) {
            continue;
        }
        if ( file_exists( STYLESHEETPATH . '/' . $template_name ) ) {
            $located = STYLESHEETPATH . '/' . $template_name;
            break;
        } elseif ( file_exists( TEMPLATEPATH . '/' . $template_name ) ) {
            $located = TEMPLATEPATH . '/' . $template_name;
            break;
        } elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
            $located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
            break;
        }
    }
 
    if ( $load && '' !== $located ) {
        load_template( $located, $require_once, $args );
    }
 
    return $located;
}
 
/**
 * Require the template file with WordPress environment.
 *
 * The globals are set up for the template file to ensure that the WordPress
 * environment is available from within the function. The query variables are
 * also available.
 *
 * @since 1.5.0
 * @since 5.5.0 The `$args` parameter was added.
 *
 * @global array      $posts
 * @global WP_Post    $post          Global post object.
 * @global bool       $wp_did_header
 * @global WP_Query   $wp_query      WordPress Query object.
 * @global WP_Rewrite $wp_rewrite    WordPress rewrite component.
     * Fires before the header template file is loaded.
     *
     * @since 2.1.0
     * @since 2.8.0 The `$name` parameter was added.
     * @since 5.5.0 The `$args` parameter was added.
     *
     * @param string|null $name Name of the specific header file to use. Null for the default header.
     * @param array       $args Additional arguments passed to the header template.
     */
    do_action( 'get_header', $name, $args );
 
    $templates = array();
    $name      = (string) $name;
    if ( '' !== $name ) {
        $templates[] = "header-{$name}.php";
    }
 
    $templates[] = 'header.php';
 
    if ( ! locate_template( $templates, true, true, $args ) ) {
        return false;
    }
}
 
/**
 * Load footer template.
 *
 * Includes the footer template for a theme or if a name is specified then a
 * specialised footer will be included.
 *
 * For the parameter, if the file is called "footer-special.php" then specify
 * "special".
 *
 * @since 1.5.0
 * @since 5.5.0 A return value was added.
 * @since 5.5.0 The `$args` parameter was added.
 *
 * @param string $name The name of the specialised footer.
 * @param array  $args Optional. Additional arguments passed to the footer template.
 *                     Default empty array.
<?php
/**
 * The Template for displaying product archives, including the main shop page which is a post type archive
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see https://docs.woocommerce.com/document/template-structure/
 * @package WooCommerce\Templates
 * @version 3.4.0
 */
 
defined( 'ABSPATH' ) || exit;
 
get_header( 'shop' );
 
/**
 * Hook: woocommerce_before_main_content.
 *
 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
 * @hooked woocommerce_breadcrumb - 20
 * @hooked WC_Structured_Data::generate_website_data() - 30
 */
do_action( 'woocommerce_before_main_content' );
 
?>
<header class="woocommerce-products-header">
    <?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
        <h1 class="woocommerce-products-header__title page-title"><?php woocommerce_page_title(); ?></h1>
    <?php endif; ?>
 
    <?php
    /**
     * Hook: woocommerce_archive_description.
     *
        'template_path' => $template_path,
        'located'       => $template,
        'args'          => $args,
    );
 
    if ( ! empty( $args ) && is_array( $args ) ) {
        if ( isset( $args['action_args'] ) ) {
            wc_doing_it_wrong(
                __FUNCTION__,
                __( 'action_args should not be overwritten when calling wc_get_template.', 'woocommerce' ),
                '3.6.0'
            );
            unset( $args['action_args'] );
        }
        extract( $args ); // @codingStandardsIgnoreLine
    }
 
    do_action( 'woocommerce_before_template_part', $action_args['template_name'], $action_args['template_path'], $action_args['located'], $action_args['args'] );
 
    include $action_args['located'];
 
    do_action( 'woocommerce_after_template_part', $action_args['template_name'], $action_args['template_path'], $action_args['located'], $action_args['args'] );
}
 
/**
 * Like wc_get_template, but returns the HTML instead of outputting.
 *
 * @see wc_get_template
 * @since 2.5.0
 * @param string $template_name Template name.
 * @param array  $args          Arguments. (default: array).
 * @param string $template_path Template path. (default: '').
 * @param string $default_path  Default path. (default: '').
 *
 * @return string
 */
function wc_get_template_html( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
    ob_start();
    wc_get_template( $template_name, $args, $template_path, $default_path );
    return ob_get_clean();
 * The Template for displaying products in a product category. Simply includes the archive template
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/taxonomy-product-cat.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see         https://docs.woocommerce.com/document/template-structure/
 * @package     WooCommerce\Templates
 * @version     4.7.0
 */
 
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}
 
wc_get_template( 'archive-product.php' );
 
            }
 
            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
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /offroad/kategoria-produktu/szkolenia/
PHP_FCGI_MAX_REQUESTS 99999
PHPRC /home/autodrom/fcgi-bin/../etc/php7.3
PWD /home/autodrom/fcgi-bin
SHLVL 0
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CONTENT_LENGTH 0
HTTP_CONNECTION close
SCRIPT_NAME /offroad/index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /offroad/kategoria-produktu/szkolenia/
REMOTE_PORT 47290
SCRIPT_FILENAME /home/autodrom/public_html/offroad/index.php
SERVER_ADMIN [no address given]
CONTEXT_DOCUMENT_ROOT /home/autodrom/public_html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/autodrom/public_html
REMOTE_ADDR 44.223.31.148
SERVER_PORT 443
SERVER_ADDR 46.4.72.6
SERVER_NAME autodrom.lovetty.ovh
SERVER_SIGNATURE
HTTP_HOST autodrom.lovetty.ovh
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
SSL_TLS_SNI autodrom.lovetty.ovh
HTTPS on
HTTP_AUTHORIZATION
SCRIPT_URI https://autodrom.lovetty.ovh/offroad/kategoria-produktu/szkolenia/
SCRIPT_URL /offroad/kategoria-produktu/szkolenia/
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI autodrom.lovetty.ovh
REDIRECT_HTTPS on
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI https://autodrom.lovetty.ovh/offroad/kategoria-produktu/szkolenia/
REDIRECT_SCRIPT_URL /offroad/kategoria-produktu/szkolenia/
FCGI_ROLE RESPONDER
PHP_SELF /offroad/index.php
REQUEST_TIME_FLOAT 1711629582.809
REQUEST_TIME 1711629582
empty
0. Whoops\Handler\PrettyPageHandler