Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pagination]

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

0
votes
0answers
20 views

How to modify the code to include “rel=next” and “rel=prev” tags?

I have a Wordpress site with some posts splitted in pages. I added post pagination via this code: Single.php: <?php wp_link_pages(array( 'before' => '<div class="page-links"><span ...
0
votes
0answers
16 views

I am unable to Split my Long Post using <!--nextpage--> Code

Whenever I enter the command <!--nextpage--> in html, it just breaks my post and does not show next or 1,2,3 pages to go for next broken page. I have already tried to add this code <?php ...
0
votes
1answer
20 views

Pagination on custom post type on front-page.php

I've seen several (and have tried at least 15+ methods here on StackExchange) ways of how to do the custom post type loop, none work in my case. I have tried methods using paged and without, using ...
0
votes
0answers
14 views

Create custom design for posts loop with pagination

I need to create a simple posts loop to be shown on the homepage (Meaning - I am in "page" and not "blog" or "archive" This is what I need: Display maximum of 5 posts there will be arrows on both ...
0
votes
0answers
17 views

Custom archive paged head title

My website is in hebrew and when im in a paged archive the title is "archive title" page 2 of 4. How can i add the title only in archives that are in a page 2 or higher? I am using Yoast SEO. And its ...
0
votes
0answers
11 views

Pagination not working correctly

I wrote a query like this: $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $q = new WP_Query( array( 'post_type' => 'product','posts_per_page' => 15,'paged' => $paged) )...
0
votes
0answers
29 views

Woocommerce 'order_by' random with 1 hour seed refresh

I need my woocommerce products to display randomly. My products are actually people and the random element is so different people get seen on the first page so no-one is favoured. So, I have ...
0
votes
0answers
23 views

Remove pagination when using Rest api to display posts

I'm using Wp Rest API to display all the posts in one page and the problem I have is that WordPress is creating several pages "example.com/articles/page/2" etc... which is a duplicate of the first ...
-1
votes
0answers
16 views

Custom pagination takes 9 out of 10 results at time

i really hope you can help me about this little problem, i have a custom page with pagination where i set 10 post per page. Pagination works but something on code display only 9 of 10 results per page....
0
votes
0answers
31 views

How to prevent automatic redirect of pagination URL

I built a custom pagination that works fine on two local server configurations (homebrew installed httpd, mysql 5.7 & php 7.0). However, on the live server my (parameter containing) URL https://...
0
votes
0answers
18 views

Paginate default 'Posts' post type in other pages

I have an 'Event' post type and paginating it in archive-event.php without a problem. $today = date('Ymd'); $paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1; $args = ...
1
vote
2answers
40 views

Paginate Pages by only showing 3 pages at most

I'm trying to use Wordpress paginate function to only show 3 pages at most(client wants it this way) so that when you go up a page it shows the current page you're on and the previous and next page: ...
0
votes
0answers
27 views

WP_query with pagination gives a 404 after page 1

So i couldn't display a custom pagination on a custom wp_query index.php page and then found this answer wordpress.stackexchange.com/questions/160175/pagination-on-a-wp-query-not-showing-navigation-...
0
votes
1answer
25 views

get_next_posts_page_link adds Inexistent directories

Using get_next_posts_page_link function to get url of paginated post's next page url, but it's adding directories to it that simply do not exist. Here is the code where I use it and probably missing ...
0
votes
1answer
31 views

How to add post page pagination to template part?

How can I get this page to display the post page pagination? I'm using a custom blog template with a get_template_part. https://www.nowitconnects.com/blog/ <?php /** * Template part for ...
0
votes
0answers
11 views

AJAX and History API for the default wordpress pagination

What I want to achieve is AJAX-ified pagination for the WordPress archive/pages/posts etc meaning that I would like to keep the standard URL structure: example.com/page/2/ but using the combination ...
0
votes
0answers
27 views

How to paginate across foreach loop?

I want to paginate a lengthy page, but it is not about paginating a post loop. My site has thousands of posts of type "article". And taxonomies including "company" and "format" - an "article" can be ...
0
votes
0answers
24 views

Pagination in shortcode not working

I got a shortcode that displays a loop of posts with pagination. My problem is I can seem to make the pagination work. Although the URL changes but the list of the page is not working. function ...
0
votes
0answers
14 views

404 error when using pagination with custom taxonomy of a custom post type

I'm using a plugin called Custom Post Type Permalinks to my URLs pretty -> sitename.com/CPT/taxonomy. When I apply paginate_links() to taxonomy.php the function seems to works as it produces the ...
0
votes
0answers
16 views

Adding pagination to Ajax Query

I have a search page. It works like this. (1) User searches using form in the homepage (2) User is taken to search results page (3) If user modifies the search term( there is form with in the search ...
0
votes
0answers
17 views

WooCommerce Custom Pagination Layout

as currently my site product pagination is display as PREVPAGE 1 2 3 .. 15 NEXTPAGE May I know how I can make it as FIRSTPAGE PREVPAGE 12345 NEXTPAGE LASTPAGE ? I'm trying to achieve it same as https:...
0
votes
0answers
31 views

query problem for display with pagination

I developed a wordpress page template (which is supposed to display digital products that I sell on my site) that worked without problems for months, but since yesterday, the page template doesn't ...
0
votes
2answers
41 views

How can I change the output display of my pagination?

How can I change the output display of my pagination? I have been trying for the past few hours to format the output of my pagination links (1,2,3, etc.) to resemble the below: I have been unable to ...
0
votes
1answer
15 views

Why is my loop not populating the page with my custom taxonomy terms from my custom post type?

Why is my loop not populating the page with my custom taxonomy terms from my custom post type? Currently it is displaying an empty box instead of pulling in the custom taxonomy terms from my custom ...
0
votes
0answers
14 views

Pagination on Search Query not formatted correctly

I have in my pagination code below I have seemed to figured out how to omit the /page/1/ from the first link of my pagination like this 'base' => get_pagenum_link(1) . '%_%', on news posts and ...
0
votes
0answers
12 views

How do I get the “Read More” button to work on theme Twenty Seventeen?

I have an article which shows up in the right sub-page under the right page in the menu bar directly beneath the main image on the homepage of the Twenty Seventeen theme when viewing the public site. ...
0
votes
1answer
21 views

Generating rel=“prev” and rel=“next” using filters

In wp-includes\link-template.php the function which defines the pagination is: /** * Retrieves the previous posts page link. * * @since 2.7.0 * * @global int $paged * * @param string $label ...
0
votes
0answers
37 views

infinite scroll + pagination in wordpress blogs

I am looking for some infinite scrolling with a pagination in a footer, something like https://codepen.io/SitePoint/pen/XXLrbE to implement in WordPress posts/woocommerce product. Can anyone of you ...
2
votes
1answer
62 views

Wordpress Pagination not working, any ideas?

So I've been looking into why the pagination isn't working, but I just can't find anything. When it goes to page 2, it just shows the same as the first page. Any other ideas? <?php global $...
0
votes
0answers
32 views

How can I get my pagination loop to display the correct number of total pages?

Currently my pagination is showing 7 posts on the first page and 6 on each page after. This is what I want. The current readout looks like this: . The total count of my pages changes as soon as I ...
0
votes
0answers
24 views

pagination for meta_post

I have some problem, I want to show my meta_post 2 per page (1 post have more than 1 meta_post), but my code still show all meta_post $metas = get_post_meta( $ids, 'value_gallery', false ); foreach (...
0
votes
1answer
71 views

Pagination for Custom WP_Query not displaying page 2 results

I know this question has been asked many times, and I've been trying every answer I came across all day from 11am-9pm and I am STUCK. Here is my search page http://tribute-software.com/development/?s=...
0
votes
1answer
67 views

Following/Followers Users list Using Ajax Pagination inside Author Profile

I will try to be clear, I'm using "Users Following System" plugin. And I added a list of the following/followers users into the author.php profile, now I'm trying to use Ajax pagination. For sure ...
0
votes
0answers
23 views

Search, pagination, the last pages leads to 404 page

sorry Im new to Wordpress. I have a search list and able to browse among hits: "http://example.com/search/SEARCHEDKEYWORD/page/11/" I have 15 pages, and the last 3 pages leads to 404 page. So, http://...
0
votes
0answers
14 views

make pagination on single-gallery with content from meta value

I have a file single-gallery and this content is image from meta_value , and i want make pagination for limit show image per page on all post , this my code $paged = (get_query_var('page')) ? ...
-1
votes
1answer
29 views

See the process of creating a taxonomy and tell me where I made a mistake

Now I will acquaint you with the process of creating a taxonomy and the appearance of an error in the pagination of posts for a certain category of created custom taxanomy. Step 1: Register custom ...
0
votes
0answers
12 views

make post pagination with image from meta post

i have gallery post , with value post is image from meta post , and i want make this post like this fiddle but i dont know how to make it , i was try use this code <?php while ( have_posts() ) : ...
0
votes
0answers
32 views

my pagination not currect work

this is my code... $paged = (get_query_var( 'paged' )) ? get_query_var( 'paged' ) : 1; $term = get_queried_object(); $q=new WP_Query(array('post_type'=>'furniture_post','category_name'=>"$...
0
votes
0answers
58 views

Remove "page/' from blog pagination url

I'm a designer and I have a blog but my pagination send to not found page because when I go to 2 page got this URL (domain.com/blog/page/2) if I remove /page/ found the correct page. Like this: (...
0
votes
0answers
26 views

Pagination for get_terms leading to 404

I have a very long list of categories in my Wordpress site (220 and counting). I want to set a custom page template where I can list all categories in alphabetical order, but being so many, I want to ...
0
votes
0answers
17 views

paginate_links pagination with new variable pg

I would like to add new parameter "pg" as page number with help of paginate_links(). My website: https://www.dealfinder.lk/search/?deal=happy-hour&pg=2 Here is my function : echo ...
0
votes
2answers
38 views

Adding pagination to a custom archive template

I'm trying to add pagination to my archive template. If I use the same code as on my main blog template it doesn't filter results based on the tag in the URL, instead it simply shows all posts. ...
1
vote
1answer
24 views

How do I detect which page I'm on within a paginated post?

I'm using wp_link_pages() to paginate a post. I want to show something below the post content only on the first page of the post. Naturally I thought I'd use get_query_var('paged') to get the page ...
0
votes
0answers
24 views

Wordpress paginate_links function does not work on homepage

When the 'news' page is not on the main page the pagination happens normally, and you can change the page to other 'news'. Now when it is set to the main page it is not possible to change go to page 2,...
0
votes
2answers
32 views

Adding pagination to my theme [closed]

I would like to add a pagination to my wordpress theme. However, for me it is not so easy because my theme is built from the plugin "AT Posts Column", which displays the latest posts on the main page. ...
0
votes
0answers
15 views

next-post – prev-post within the same child category

I am using this code to show WP post nav in bottom of the single.php it works but it nove by parent category post. How can i set it to work with grandchild category term? <?php previous_post_link(...
0
votes
0answers
105 views

WP admin ajax Pagination issue

Hello i am using ajax to filter my custom post type based on categories by ajax after ajax filter i am getting my desire result but after ajax call pagination not working. this is giving me this ...
0
votes
0answers
40 views

Pagination $paged return 0

i have problems with pagination. Here is my code: global $wp_query; $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; var_dump(get_query_var( 'paged' )); // HERE ...
0
votes
0answers
42 views

List tags and pagination

I have a custom template page where I display all TAGS used in the site. In my case I use them to show the author name. The way I display them is... <ul> <?php $tags = get_tags()...
0
votes
0answers
16 views

page/2 returns 404 in authors.php

I have a wordpress website. I have two user roles. one is "author" and another is "team_member(which is created using user role editor plugin)". Now pagination is working fine for role("authors") but ...