Note that there are some explanatory texts on larger screens.

plurals
  1. POWordPress - pagination on template page?
    text
    copied!<p>I'm building my site with WordPress templates for granular control over how each of them looks.</p> <p>I have my loop on my news page to pull in posts from, well, posts.</p> <p>Working fine, or so I thought.</p> <pre><code>&lt;?php /* Template Name: News */ ?&gt; &lt;?php get_header(); ?&gt; &lt;div id="main-content"&gt; &lt;?php get_sidebar(); ?&gt; &lt;?php query_posts ("posts_per_page=4"); ?&gt; &lt;?php if (have_posts()) : while ( have_posts()) : the_post(); ?&gt; &lt;div &lt;?php post_class() ?&gt; id="post-&lt;?php the_ID(); ?&gt;"&gt; &lt;h2&gt;&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt; &lt;div class="entry"&gt; &lt;?php the_content(); ?&gt; &lt;/div&gt; &lt;?php include (TEMPLATEPATH . '/inc/meta.php' ); ?&gt; &lt;div class="postmetadata"&gt; &lt;?php the_tags('Tags: ', ', ', '&lt;br /&gt;'); ?&gt; Posted in &lt;?php the_category(', ') ?&gt; | &lt;?php comments_popup_link('No Comments &amp;#187;', '1 Comment &amp;#187;', '% Comments &amp;#187;'); ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php endwhile; endif; ?&gt; &lt;div class="navigation"&gt; &lt;div class="next-posts"&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt; &lt;div class="prev-posts"&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- end div main-content --&gt; &lt;?php get_footer(); ?&gt; </code></pre> <p>The older/newer entries show up, but after clicking on them it just takes me to the same page/newest 4 posts.</p> <p>How do I get the pagination working with template pages like this?</p>
 

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