Breaking up content into smaller-sized pages to be viewed individually

learn more… | top users | synonyms (1)

-2
votes
0answers
18 views

Pagination code display only first page

I want to apply pagination to my custom post type. Here is the pagination function I have used. function roots_pagination($pages = '', $range = 2) { $showitems = ($range * 2)+1; global ...
1
vote
1answer
360 views

Too many posts cause slow load when paginating

I have about 10k posts and I made a page that lists all posts but it is paginated every 54posts. It gives 131 queries in 6.730 seconds which is pretty slow to load. Is there a way to make it load ...
1
vote
1answer
772 views

Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it

I'm trying to output a custom post type archive using a shortcode. Everything works fine except for the get_next_posts_link part. The weird part is that it's right next to a get_previous_posts_link ...
0
votes
0answers
27 views

Pagination and Taxonomy query string

I have a CPT called "Books" and template-books.php which I use to display the posts. WordPress pagination (code below) works fine. The result in the browser is usually something like this ...
1
vote
0answers
33 views

Pagination in relation to archive.php

A small problem here, I just don't know how to change this because I'm a self taught newbie. I made a child-theme from the simone-theme with a static front-page. To it I have the archive.php as the ...
0
votes
1answer
686 views

Pagination with wp_pagenavi not working on custom page

I am having trouble with wp_pagenavi working on the start page using a custom query. It's working well on every standard template like category.php. But not on the homepage. Here is the code: ...
0
votes
1answer
2k views

Custom Post Type Pagination on Single.php?

The same old problem and not sure if its even possible. Pagination on a single.php custom post type, is it possible? This works fine until i turn permalinks to /%postname%/ then it just reloads the ...
2
votes
3answers
132 views

WP_Query and Pagination on a Static front page

For the past two days I've been trying to debug an issue with WP_Query() and Pagination. A website I'm a dev for uses a Wordpress theme (Salient by ThemeNectar) that includes the visual composer ...
1
vote
3answers
674 views

Pagination: /tags/tag_name/?paged=2 gives a 404 error

I need to paginate an archive page. Pagination works perfectly fine for everything except tag/category archives. Basically if I use /tags/tag_name/?paged=2 it gives me a 404 error. But if I use ...
0
votes
1answer
62 views

Pagination not working

I have been using the same pagination query for the majority of the websites i have created. This time it is not working for some reason I have used the pagination trouble shooting links Here but ...
4
votes
6answers
10k views

Get the current page URL (including pagination)

Is there a WP function to automatically get the correct URL of the current page? Meaning if I just opened a single post, the function returns the same as get_permalink(), but if I'm on a paginated ...
0
votes
0answers
60 views

Using offset with custom Archive page

Situation: News page - Currently shows the latest 5 news items Archive page - Starts on post 6, I've setup pagination. For testing purposes I've got 20 posts numbered 1 - 20. <?php ...
0
votes
0answers
15 views

Search URL gives 404

I have search URL that looks like this /?s=term //this works But when I click on a pagination link to go to second page I get this /page/2/?s=term //this gives 404 When I manually enter this ...
1
vote
5answers
526 views

Pagination for blog posts reloading same page

Symptoms Visiting /blog/ loads the first 10 posts, as expected. Visiting /blog/page/2/ (and onward) loads the new URL but with the same 10 posts. Nothing changes but the URL. Setup Details Custom ...
0
votes
1answer
21 views

Archive pagination not working

I am trying to add pagination for my Archive. I want to show 12 posts per page and then show the 'next' / 'previous' buttons. When I manually change the value of the $paged variable, the 1 into a 2 ...
0
votes
1answer
718 views

List posts based on first letter of posts

I want add a pagination How can I do this on both loop.php and search.php. I want show alphabetic index to search only posts with starting letter = [E] for example. Right now, if I search with E it ...
-2
votes
0answers
18 views

How to add pagination to custom Woocommerce loop?

I am using woocommerce and need to make a new loop. This loop is working, however, some key information is left out, I need the number of products per page, and more importantly the pagination is ...
0
votes
0answers
17 views

How to paginate query using get_categories()

How can I paginate my custom template page with get_categories() loop? $args = array ( 'taxonomy' => 'programs-cat', 'number' => 1, 'offset' => 1, ) ?> <?php $programs = ...
0
votes
0answers
26 views

Genesis custom post type pagination with custom taxonomy query loop

I am trying to create Genesis pagination for a page housing all posts from a particular taxonomy. I would use the many solutions given in this WordPress Stack Exchange but I can't figure out how to ...
1
vote
2answers
1k views

Pagination doesn't work

I created myfile.php with the following content: global $paged; if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); } else if ( get_query_var( 'page' ) ) { $paged = ...
0
votes
3answers
3k views

Pagination not working on home page

I've a page named "share" with a complex loop that's working perfectly. This page is located at domain.com/share. Now I need to use this page as the home page, so I went to "Settings -> Reading" and ...
0
votes
1answer
368 views

/tag/tag_name/page/2 gives a 404 error

I created my own template for list of entries for certain tag (tag.php), It will shows up 10 entries, and with Previous & Next link. <?php $paged = get_query_var('paged') ? ...
0
votes
1answer
402 views

foreach pagination

I am looking for help in how to paginate my foreach output. I've looked at other questions and answers and cannot find a solution that works for me or that I can figure out on my own. Right now my ...
0
votes
0answers
18 views

pagination is not working

i know there are plenty of similar questions here ... but I couldn't find an answer. I have an overview page where I can't get the numbered pagination working: I would really appreciate any help. ...
0
votes
1answer
167 views

Prev and Next link for splitting single post into multiple pages [duplicate]

I have pagination on my site like this: Pages 1 2 3 4 … and so on. I am doing this by adding <--nextpage--> where i want to split my long pages into multiple pages. I want to add ...
10
votes
6answers
6k views

Paged posts - how to use numbers and next/previous links?

I want wp_link_pages (mutli-page posts) to display the page numbers, the word "previous" before those numbers, and a "next" after those numbers. It would look like this: Prev 1, 2, 3, 4 Next I'm ...
0
votes
0answers
31 views

How to display most viewed posts without any plugins

I'm working on a WordPress site that is only in staging mode at the moment and I want to be able to display the most viewed posts in a template. I have some code that is working, but with a little ...
2
votes
1answer
3k views

Wordpress Pagination Not Working - Always Showing First Pages Content

I am working on a website where I have a blog but I also have a custom post type to allow me to drop in some videos. I would like to use pagination so that if there are more then 9 videos displayed, ...
-2
votes
0answers
30 views

Pagination not working on category.php

Hi I'm using default wordpress function for numeric pagination, in a custom template is working but in category.php is not, of course i searched in google and checked a lot of tutorials and questions ...
0
votes
1answer
38 views

Particular category single page paging

I am having an issue for single page paging. My next and previous button code always pull up from other category post also. I have category called video and I also made a custom single page which is ...
1
vote
1answer
777 views

404 - Category pagination for custom post type

--Edit I've managed to narrow it down that the paged variable is not working properly here, (get_query_var('paged')) ? get_query_var('paged') : 1; is always returning 0 although maybe it is due to ...
1
vote
1answer
441 views

Pagination on Custom Post Type: 404 Error

I've been getting a 404 error on a CPT archive page, and am not sure why. I can go to the page set for the custom post type archive, but the next page /mycustomposttype/page/2 gets a 404 error. I ...
0
votes
2answers
682 views

Archive Page for Custom Post Type is not Working

I have registered a custom post type "tutorials" with the following snippet. <?php /* Template Name: Tutorial Archive */ get_header(); ?> <div id="content"> <div ...
1
vote
1answer
513 views

WP_Query Pagination on multiple-loop page breaks WP or doesn't show up

The loop below is one of several on a Custom Page template, but it's the only loop that I'm trying to implement Pagination with. Once I have Pagination working for this one loop, I'll be implementing ...
0
votes
1answer
597 views

Taxonomy rewrite pagination 404

I have rewritten my taxonomy url to the name of my posts type 'filter'. Because I have done this, my pagination does not work anymore on the url: http://www.website.com/filter/term-name/ So if I ...
0
votes
0answers
27 views

Pagination on custom post types

Pagination works in the front page but in custom post type page it doesn't appear. Post type: add_action('init', 'portfolio_register'); function portfolio_register() { $args = array( ...
0
votes
2answers
2k views

Pagination with get_posts seems to work but links not showing

I've a custom page template where I want to query 2 posts from a post type and 1 post from another post type. I have it set up like this: $paged = get_query_var('paged') ? get_query_var('paged') : 1; ...
2
votes
2answers
2k views

get_query_var('paged') always returns empty

Putting this up after having hit a brick wall for possible solutions. Have a site with quite a few custom post types and associated custom taxonomies. To help make things easy, I'm using a unified ...
0
votes
1answer
31 views

How to fix blank pagination links?

I am working on a Wordpress blog that has what appears to be custom pagination for the posts. As you can see here the correct amount of links are being rendered at the bottom of the page, however ...
0
votes
1answer
31 views

How to exclude or filter password protected posts when using next_post_link() previous_post_link

I'm using next_post_link() and previous_post_link() in my theme. I excluded my password protected posts from the loop. They only appear if you enter the URL of this specific post. But, the problem is ...
1
vote
1answer
25 views

How to ignore or disable nextpage tag?

I have this site that uses the <!--nextpage--> tag in posts for pagination purposes. I want to disable pagination, but without deleting the tags for the database (maybe they'll want to use them ...
2
votes
1answer
460 views

Display all posts from all categories with pagination

Alright, this might be a tricky one to explain but I'll do my best. At the front page I want to display all the posts from all the categories. However I want them to be divided. Take this for an ...
0
votes
1answer
1k views

Custom post type archive page pagination

I have set up an archive page for my custom post type reference, where I use a query to get all posts of type reference. This works, but when I try to paginate the result, it doesn't work. Right now, ...
0
votes
1answer
363 views

get_next_posts_link() stops displaying at page 4

Please start by taking a look at this quick video: http://www.screenr.com/8vSH The problem: get_next_posts_link() disappears on page 4. That is, the "go to older posts" link disappears once I am in ...
0
votes
1answer
644 views

Pagination for Pages and Posts

I want to use Pagination throughout a new theme but am having trouble getting it to work correctly. I am using some code within my functions.php file and then calling that function. It works on the ...
0
votes
1answer
792 views

Pagination for multiple queries merging into one Loop

I have an events site where I want to display upcoming events that can be booked in ascending date order, and events that are closed for registration in descending order. I'm using get_posts for each ...
0
votes
1answer
19 views

Query post Pagination Problem

I am using following code for query post but I am not getting pagination link. Where is the problem of the following code. <div id="primary" class="content-area"> <main id="main" ...
2
votes
2answers
885 views

Placing Ads after every 10th Post with Infinite Scroll

I have to load a couple of ads, some normal html and two are java script. I've tried the PHP method of this: <?php $postnum++; if($postnum%10 == 0) { ?> <div id="topset"> <ul ...
2
votes
3answers
2k views

Display posts from the same category using next/previous post link

I am using this code, but once I click on the next post/previous post link, I am redirected to the next post/ previous post of the different category previous_post_link('%link', 'Prev post in ...
2
votes
0answers
67 views

Implementing a general Table of Content across single paginated post pages

I am working on a blog and most of my posts are so long they require pagination. See one of my posts. This post has a lot of pages. The only problem is that I can't find a way to show a table of ...