I'm building a site using "theretailer" as a base and I cant figure out where to place code to get the loop to work for a custom post type "News"? the loop the theme uses is



                while ($wp_query->have_posts()) : $wp_query->the_post();

                    <?php get_template_part( 'content', get_post_format() ); ?>             

                <?php endwhile; // end of the loop. ?>

                if (function_exists("emm_paginate")) {

I'd like to keep the same loop set up so I can use the built in paginate function?


  • 1
    Your use of the $wp_query object here is, unusual to say the least. Was there a particular reason you couldn't create a standard WP_Query object and loop, or use the pre_get_posts filter like most code?
    – Tom J Nowell
    Aug 16, 2015 at 3:36

1 Answer 1


To display 'news', you'll have to add it to your loop arguments:

  'post_type' => 'news', 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.