• Resolved kenbowen

    (@kenbowen)


    I’m having to work with a theme (Rundown) whose page.php loop looks like this:

    get_header(); ?>
      <div id="main">
        <div id="content">
          <?php while (have_posts()) : the_post();  ?>
                <?php get_template_part('content', 'page');  ?>
          <?php end while; ?>

    I need to get control of the query, say to be able to set

    <?php query_posts( array ( 'cat' => 3, 'posts_per_page' => 8 ) ); ?>
    or
    <?php query_posts( array ( 'cat=-4', ‘posts_per_page' => 8 ) ); ?>

    But inserting either of these above the “while” line in the loop above doesn’t seem to have any effect: I get exactly the posts I get without it. How does this theme organization fire wp_query? I can’t find any occurrences of wp_query (or query_posts) in the theme files.

    I’ve set up a test site at https://testblog.strong-brain.com

    Thanks in advance.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘how to use query_posts in theme loop with no wp_query present’ is closed to new replies.