1

The function wp_link_pages() is not working at all in my wordpress template. I have tried all possibilities to make it work. I didn't get any satisfying help for the same online. Please do help me. Guide.

Thanks in advance.

3 Answers 3

1

You should use <!--nextpage--> for work wp_link_pages function.

This tutorial will be help to understand how to work <!--nextpage--> https://www.youtube.com/watch?v=oGFjVx9jDd4

Example: https://codex.wordpress.org/Function_Reference/wp_link_pages#Default_Usage

0

Use the plugin WP-PageNavi - sample code below:

<?php get_header(); ?>

 <!-- Start Loop -->
 <?php query_posts('category_name='SomeCategoryName'&orderby=title&order=ASC&paged='. get_query_var('paged')); ?>           

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php //Loop Code Here ?>

    <?php endwhile; else: ?>
        <p class="error">No results found.</p>
    <?php endif; ?> 

   <!-- Start Pagination - WP-PageNavi -->
   <div id="pagination">
            <?php wp_pagenavi(); ?>
   </div>
   <!-- End Pagination -->

<?php wp_reset_query(); ?>
<!-- End Loop -->

<?php get_footer(); ?>
1
  • Thank you a ton dciso. It made my job more than easier. Commented Sep 1, 2011 at 11:16
0

I think header section the_post(); missing

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented May 19, 2022 at 12:55

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.