Pagination on front-page.php
-
I cannot seem to figure out what I am doing wrong.
I simply want to add pagination to my home-page. The person who built the theme has the wp-paginate plugin installed but I can’t seem to get that to work either so I’ve been trying to handcode the pagination in and have been experiencing difficulty.
Here is the actual page https://goo.gl/A0LRu
I’m not getting even links at the bottom that say “next” or “Previous”
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'post_type' => 'earnings', //use to be stock 'posts_per_page' => get_field('stocks'), //use to be stocks 'paged' => $paged ); $the_query = new WP_Query( $args ); while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <!-- THE MEAT OF THE WHILE LOOP THAT DISPLAYS CONTENT --> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('? Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries ?') ?></div> </div> <?php if(function_exists('wp_paginate')) { //THIS IS ME PLAYING AROUND WITH wp_paginate but not succeeding wp_paginate(); } ?> <?php wp_reset_postdata(); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Pagination on front-page.php’ is closed to new replies.