-
-
Save ekloff/7ce118f8f4559f07d9f5 to your computer and use it in GitHub Desktop.
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_action("pre_get_posts", "custom_front_page"); | |
function custom_front_page($wp_query){ | |
if($wp_query->get('page_id') == get_option('page_on_front')): | |
$wp_query->set('post_type', 'work'); | |
$wp_query->set('page_id', ''); //Empty | |
//Fix conditional Fucntions like is_front_page or is_single ect | |
$wp_query->is_page = 0; | |
$wp_query->is_singular = 0; | |
endif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment