Created
October 9, 2012 23:25
-
-
Save billerickson/3862125 to your computer and use it in GitHub Desktop.
Customizing Grid Loop Content
This file contains 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
/** Customize Blog Post Content */ | |
function atb_test( $content ) { | |
global $post; | |
if( ! ( in_array( 'feature', get_post_class() ) || in_array( 'one-third', get_post_class() ) ) | |
return $content; | |
// First Page Classes | |
if( ! $wp_query->query_vars['paged'] ) { | |
// Features | |
if( $wp_query->current_post < $grid_args['features_on_front'] ) { | |
$content = 'Test Front Page Feature Content'; | |
// Teasers | |
} else { | |
$content = 'Test Front Page Teaser Content'; | |
} | |
// Inner Pages | |
} else { | |
// Features | |
if( $wp_query->current_post < $grid_args['features_inside'] ) { | |
$content = 'Test Inner Page Feature Content'; | |
// Teasers | |
} else { | |
$content = 'Test Inner Page Teaser Content'; | |
} | |
} | |
return $content; | |
} | |
add_filter( 'the_content', 'atb_test' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment