Check if in main loop before outputting template

This commit is contained in:
Brian Miyaji
2014-05-01 12:09:31 +10:00
parent 6b6a6d3f34
commit 47ea28de13
7 changed files with 14 additions and 7 deletions

View File

@@ -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
?>
<?php

View File

@@ -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
?>
<?php

View File

@@ -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
?>
<?php

View File

@@ -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
?>
<?php

View File

@@ -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
?>
<?php

View File

@@ -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
?>
<?php

View File

@@ -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
?>
<?php