Created
October 29, 2012 11:29
-
-
Save raaar/3973056 to your computer and use it in GitHub Desktop.
WORDPRESS - Set Custom post type as HOMEPAGE
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
add_filter( 'pre_get_posts', 'my_get_posts' ); | |
function my_get_posts( $query ) { | |
if ( is_home() ) | |
$query->set( 'post_type', array( 'ale' ) ); | |
return $query; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment