Created
May 19, 2016 03:38
-
-
Save cpaul007/ed4799656f7caea324711e9f73a42fd7 to your computer and use it in GitHub Desktop.
Displaying category / tags / taxonomy intro text on 1st page only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Displaying category / tags / taxonomy intro text on 1st page only | |
* | |
* @author Chinmoy Paul | |
* @copyright Copyright (c) 2016, Genesis Developer | |
* @license GPL-2.0+ | |
* @link http://genesisdeveloper.me | |
*/ | |
//* Copy the code below this line. Add the code in your functions.php file | |
add_filter( 'genesis_term_intro_text_output', 'gd_term_intro_text_output' ); | |
function gd_term_intro_text_output( $intro_text ) { | |
global $paged; | |
//* Return early if user is not visiting the category / tag or taxonomy archive page | |
if ( ! is_category() && ! is_tag() && ! is_tax() ) | |
return; | |
//* Return early if user is paginating the archive page | |
if( $paged > 1 ) | |
return; | |
return $intro_text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment