Created
February 5, 2024 23:50
-
-
Save BenSibley/7d0eec07a271218be07e6f7a2c44ee91 to your computer and use it in GitHub Desktop.
Add Apps to 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
function founder_add_apps_to_homepage($query) | |
{ | |
if (is_home() && $query->is_main_query()) { | |
$query->set('post_type', array( 'post', 'app')); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts', 'founder_add_apps_to_homepage'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment