Support » Themes and Templates » How to add Pagination to the tag file

  • Hey, I can’t quite figure out how to add my own custom pagination function to the tag template, my function basically takes in 2 numbers; Page Number, Total Pages. When I supply it with all the numbers it needs it displays my pagination perfectly, but when i’m using it on my custom tag.php template page and I go to another page other then 1, it displays my homepage.

    The URL is /tag/TAG-HERE/page/2 that wont work
    but the URL /tag/TAG-HERE works fine.

    My Query
    $the_query = new WP_Query( 'posts_per_page=' . $blog_options['number_posts'] . "&paged=" . $page . "&tag=" . $query_tag);

    My While Loop
    while ($the_query -> have_posts()) : $the_query -> the_post();

    Any help is greatly appreciated.

    [No bumping, thank you.]

  • The topic ‘How to add Pagination to the tag file’ is closed to new replies.