Get_Template_Part And Two Global WP_Query On Frontpage

You shouldn’t have to globalize the main $wp_query, only secondary queries. Take the following example, if I have a very simple frontpage.php template it would look like: <?php get_header(); ?> <?php get_template_part( ‘templates/template’, ‘main-query’ ); ?> <?php get_footer(); ?> I can then create a template found in /theme-name/templates/template-main-query.php which has a normal Loop: <?php if( … Read more