Note that there are some explanatory texts on larger screens.

plurals
  1. POwordpress query_posts in archive issue
    primarykey
    data
    text
    <p>I want to make all my posts in each category descend based on its score(using GD star rating plugin). I have found out in the plugin site, that I need to add <code>query_posts("gdsr_sort=rating");</code> in my archive.php file.</p> <p>So this is how my archive.php looks with query_posts added:</p> <pre><code> &lt;?php query_posts("gdsr_sort=rating"); ?&gt; &lt;?php while (have_posts()) : the_post(); ?&gt; &lt;div &lt;?php post_class() ?&gt;&gt;&lt;li&gt; &lt;h1&gt;&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt; &lt;?php if ( has_post_thumbnail() ) : ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_post_thumbnail(); ?&gt;&lt;/a&gt; &lt;?php endif; ?&gt; &lt;?php the_content('Read more...'); ?&gt; &lt;/li&gt; &lt;/div&gt; &lt;?php endwhile; ?&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;?php wp_reset_query(); ?&gt; </code></pre> <p>And it messed things up, so I tried using <code>query_posts('posts_per_page=5');</code> The good thing is that it is showing 5 articles per page. The bad thing is that it's showing the wrong articles. To be precise, no matter which sub-category I go.. the same articles are being displayed which aren't supposed to be in that sub-category. When you go to next page.. the same articles are being displayed. These articles that are shown everywhere only belong to 1 sub-category. I should also mention that I have like 10 cateogires and each of them has 2-3 sub-categories..</p> <p>I'm at a loss here, hope you understood my explanation.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload