Error
Call to undefined method Timber\QueryIterator::found_posts() Error thrown with message "Call to undefined method Timber\QueryIterator::found_posts()" Stacktrace: #11 Error in /home/c7sunday/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/PostQuery.php:42 #10 Timber\PostQuery:__construct in /home/c7sunday/public_html/wp-content/plugins/timber-library/lib/Timber.php:260 #9 Timber\Timber:get_context in /home/c7sunday/public_html/wp-content/themes/rt_salient/header.php:22 #8 require_once in /home/c7sunday/public_html/wp-includes/template.php:722 #7 load_template in /home/c7sunday/public_html/wp-includes/template.php:671 #6 locate_template in /home/c7sunday/public_html/wp-includes/general-template.php:41 #5 get_header in /home/c7sunday/public_html/wp-content/plugins/woocommerce/templates/archive-product.php:20 #4 include in /home/c7sunday/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php:249 #3 wc_get_template in /home/c7sunday/public_html/wp-content/plugins/woocommerce/templates/taxonomy-product_tag.php:22 #2 include in /home/c7sunday/public_html/wp-includes/template-loader.php:78 #1 require_once in /home/c7sunday/public_html/wp-blog-header.php:19 #0 require in /home/c7sunday/public_html/index.php:17
Stack frames (12)
11
Error
/vendor/timber/timber/lib/PostQuery.php42
10
Timber\PostQuery __construct
/home/c7sunday/public_html/wp-content/plugins/timber-library/lib/Timber.php260
9
Timber\Timber get_context
/home/c7sunday/public_html/wp-content/themes/rt_salient/header.php22
8
require_once
/home/c7sunday/public_html/wp-includes/template.php722
7
load_template
/home/c7sunday/public_html/wp-includes/template.php671
6
locate_template
/home/c7sunday/public_html/wp-includes/general-template.php41
5
get_header
/home/c7sunday/public_html/wp-content/plugins/woocommerce/templates/archive-product.php20
4
include
/home/c7sunday/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php249
3
wc_get_template
/home/c7sunday/public_html/wp-content/plugins/woocommerce/templates/taxonomy-product_tag.php22
2
include
/home/c7sunday/public_html/wp-includes/template-loader.php78
1
require_once
/home/c7sunday/public_html/wp-blog-header.php19
0
require
/home/c7sunday/public_html/index.php17
     * @api
     * @since 1.11.1
     * @var int The amount of posts found in the query.
     */
    public $found_posts = null;
 
    protected $userQuery;
    protected $queryIterator;
    protected $pagination = null;
 
    /**
     * @param mixed       $query
     * @param string     $post_class
     */
    public function __construct( $query = false, $post_class = '\Timber\Post' ) {
        $this->userQuery = $query;
        $this->queryIterator = PostGetter::query_posts($query, $post_class);
 
        if ( $this->queryIterator instanceof QueryIterator ) {
            $this->found_posts = $this->queryIterator->found_posts();
        }
 
        $posts = $this->queryIterator->get_posts();
 
        parent::__construct($posts, $post_class);
    }
 
    /**
     * @return mixed the query the user orignally passed
     * to the pagination object
     */
    protected function get_query() {
        return $this->userQuery;
    }
 
    /**
     * Set pagination for the collection. Optionally could be used to get pagination with custom preferences.
     *
     * @param     array $prefs
     * @return     Timber\Pagination object
    }
 
    /**
     * Get context.
     * @api
     * @return array
     */
    public static function get_context() {
        if ( empty(self::$context_cache) ) {
            self::$context_cache['http_host'] = URLHelper::get_scheme().'://'.URLHelper::get_host();
            self::$context_cache['wp_title'] = Helper::get_wp_title();
            self::$context_cache['body_class'] = implode(' ', get_body_class());
 
            self::$context_cache['site'] = new Site();
            self::$context_cache['request'] = new Request();
            $user = new User();
            self::$context_cache['user'] = ($user->ID) ? $user : false;
            self::$context_cache['theme'] = self::$context_cache['site']->theme;
 
            self::$context_cache['posts'] = new PostQuery();
 
            /**
             * @deprecated as of Timber 1.3.0
             * @todo remove in Timber 1.4.*
             */
            self::$context_cache['wp_head'] = new FunctionWrapper( 'wp_head' );
            self::$context_cache['wp_footer'] = new FunctionWrapper( 'wp_footer' );
 
            self::$context_cache = apply_filters('timber_context', self::$context_cache);
            self::$context_cache = apply_filters('timber/context', self::$context_cache);
        }
 
 
        return self::$context_cache;
    }
 
    /**
     * Compile a Twig file.
     *
     * Passes data to a Twig file and returns the output.
 * @package   Gantry 5 Theme
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2015 RocketTheme, LLC
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */
 
defined('ABSPATH') or die;
 
/*
 * 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'] = $gantry->isCompatible('5.1.5') ? $theme->render('partials/page_head.html.twig', $context) : null;
 
$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 ) {
    $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 );
    }
 
    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
 *
 * @global array      $posts
 * @global WP_Post    $post
 * @global bool       $wp_did_header
 * @global WP_Query   $wp_query
 * @global WP_Rewrite $wp_rewrite
 * @global wpdb       $wpdb
function get_header( $name = null ) {
    /**
     * Fires before the header template file is loaded.
     *
     * @since 2.1.0
     * @since 2.8.0 $name parameter added.
     *
     * @param string|null $name Name of the specific header file to use. null for the default header.
     */
    do_action( 'get_header', $name );
 
    $templates = array();
    $name      = (string) $name;
    if ( '' !== $name ) {
        $templates[] = "header-{$name}.php";
    }
 
    $templates[] = 'header.php';
 
    locate_template( $templates, true );
}
 
/**
 * 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
 *
 * @param string $name The name of the specialised footer.
 */
function get_footer( $name = null ) {
    /**
     * Fires before the footer template file is loaded.
     *
     * @since 2.1.0
<?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 tag. Simply includes the archive template
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/taxonomy-product_tag.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     1.6.4
 */
 
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}
 
wc_get_template( 'archive-product.php' );
 
    elseif ( is_single() && $template = get_single_template() ) :
    elseif ( is_page() && $template = get_page_template() ) :
    elseif ( is_singular() && $template = get_singular_template() ) :
    elseif ( is_category() && $template = get_category_template() ) :
    elseif ( is_tag() && $template = get_tag_template() ) :
    elseif ( is_author() && $template = get_author_template() ) :
    elseif ( is_date() && $template = get_date_template() ) :
    elseif ( is_archive() && $template = get_archive_template() ) :
    else :
        $template = get_index_template();
    endif;
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    if ( $template = apply_filters( 'template_include', $template ) ) {
        include( $template );
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
endif;
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/wp-blog-header.php' );
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /product-tag/design/
PATH /usr/local/bin:/usr/bin:/bin
TZ America/Chicago
REDIRECT_STATUS 200
UNIQUE_ID XtX5S2ZxTAwr-vKURYlVQwAAABE
PHPHANDLER /usr/local/php73/bin/php
HTTP_HOST 7sundays.co.za
HTTP_X_REAL_IP 3.235.75.174
HTTP_ACCEPT_ENCODING br,gzip
HTTP_CONNECTION close
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_ACCEPT_LANGUAGE en-US,en;q=0.5
SERVER_NAME 7sundays.co.za
SERVER_ADDR 35.209.96.158
SERVER_PORT 80
REMOTE_ADDR 3.235.75.174
DOCUMENT_ROOT /home/c7sunday/public_html
SERVER_ADMIN webmaster@7sundays.co.za
SCRIPT_FILENAME /home/c7sunday/public_html/index.php
REMOTE_PORT 54632
REDIRECT_URL /product-tag/design/
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1591081292.0619
REQUEST_TIME 1591081292
empty
0. Whoops\Handler\PrettyPageHandler