From 47ea28de13d7df4f61c001dbf62db06d86c7f338 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 1 May 2014 12:09:31 +1000 Subject: [PATCH] Check if in main loop before outputting template --- templates/content-single-calendar.php | 3 ++- templates/content-single-event.php | 3 ++- templates/content-single-list.php | 3 ++- templates/content-single-player.php | 3 ++- templates/content-single-staff.php | 3 ++- templates/content-single-table.php | 3 ++- templates/content-single-team.php | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/templates/content-single-calendar.php b/templates/content-single-calendar.php index 86f3fbdf..9cceb931 100644 --- a/templates/content-single-calendar.php +++ b/templates/content-single-calendar.php @@ -6,10 +6,11 @@ * * @author ThemeBoy * @package SportsPress/Templates - * @version 0.8 + * @version 0.8.1 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly +if ( ! in_the_loop() ) return; // Return if not in main loop ?>