Created
July 23, 2014 11:07
-
-
Save tjhole/4fd17653c25f77609760 to your computer and use it in GitHub Desktop.
WORDPRESS: Custom Post Type Front Page - 2014 (b)
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
function enable_front_page_stacks( $query ){ | |
if('' == $query->query_vars['post_type'] && 0 != $query->query_vars['page_id']) | |
$query->query_vars['post_type'] = array( 'page', 'stack' ); | |
} | |
add_action( 'pre_get_posts', 'enable_front_page_stacks' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment