Error
Call to undefined method Timber\QueryIterator::found_posts() Error thrown with message "Call to undefined method Timber\QueryIterator::found_posts()" Stacktrace: #5 Error in /home/c7sunday/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/PostQuery.php:42 #4 Timber\PostQuery:__construct in /home/c7sunday/public_html/wp-content/plugins/timber-library/lib/Timber.php:260 #3 Timber\Timber:get_context in /home/c7sunday/public_html/wp-content/themes/rt_salient/page.php:33 #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 (6)
5
Error
/vendor/timber/timber/lib/PostQuery.php42
4
Timber\PostQuery __construct
/home/c7sunday/public_html/wp-content/plugins/timber-library/lib/Timber.php260
3
Timber\Timber get_context
/home/c7sunday/public_html/wp-content/themes/rt_salient/page.php33
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.
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * To generate specific templates for your pages you can use:
 * /mytheme/views/page-mypage.html.twig
 * (which will still route through this PHP file)
 * OR
 * /mytheme/page-mypage.php
 * (in which case you'll want to duplicate this file and save to the above path)
 */
 
$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;
 
$post            = new TimberPost();
$context['post'] = $post;
 
Timber::render(['page-' . $post->post_name . '.html.twig', 'page.html.twig'], $context);
 
    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 /synergy-services-growing-education-training-organisations/accreditation-coaching/
PATH /usr/local/bin:/usr/bin:/bin
TZ America/Chicago
REDIRECT_STATUS 200
UNIQUE_ID XtfT8GJKUAyEvbPlN5wrOgAAACE
PHPHANDLER /usr/local/php73/bin/php
HTTP_HOST 7sundays.co.za
HTTP_X_REAL_IP 18.204.227.117
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 18.204.227.117
DOCUMENT_ROOT /home/c7sunday/public_html
SERVER_ADMIN webmaster@7sundays.co.za
SCRIPT_FILENAME /home/c7sunday/public_html/index.php
REMOTE_PORT 56008
REDIRECT_URL /synergy-services-growing-education-training-organisations/accreditation-coaching/
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 1591202800.5344
REQUEST_TIME 1591202800
empty
0. Whoops\Handler\PrettyPageHandler