Created
November 22, 2016 05:03
-
-
Save boluda/ceef7a1ed1425e925f18a124720a8b4b to your computer and use it in GitHub Desktop.
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 agregar_cpts_en_loop($query) { | |
if ($query->is_feed() || $query->is_main_query() && $query->is_front_page()) { | |
$query->set('post_type', array('post', 'YOUR_POST_TYPE')); | |
} | |
} | |
add_action('pre_get_posts', 'agregar_cpts_en_loop'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment