/ Published in: PHP

Add 'demo" posttype in main loop and also in the RSS feed
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function custom_posttype_in_home_loop($query) { if (is_home() && $query->is_main_query() || is_feed()) return $query; } add_filter('pre_get_posts', 'custom_posttype_in_home_loop');
Comments
