Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
1 vote
2 answers
35 views

Add additional first page, last page links to the_posts_pagination()

Is there a way to add additional first and last page links to the pagination object if it is rendere with the the_posts_pagination() method? At this point I have the following the_posts_pagination( ...
user avatar
  • 822
1 vote
0 answers
13 views

Pagination stopped working after assigning custom page template to new page (different slug)

I am having a problem with pagination on one of my CPT after assigning the custom page template to a different page with a different slug. It all worked perfectly on the test page I developed it with. ...
user avatar
0 votes
1 answer
11 views

Reciving Error 404 blog/page/2/

I can't seem to understand the issue here with my pagination? when visiting /blog/page/2 page goes to 404 page. Help me guys? <div class="row"> <?php ...
user avatar
0 votes
0 answers
23 views

Pagination at category doesnt work with same name of page

i have a problem with my pagination but only at category page. I'am not developer, and i try fix it from few days. My pagination working if i make different name of pages for main BLOG, and category ...
user avatar
0 votes
0 answers
14 views

excluding posts by an ACF field in pagination

So I have this $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'post_type' => 'post', 'posts_per_page' => 12, 'category' => 1165, 'meta_query' =&...
user avatar
  • 1
0 votes
0 answers
18 views

How to work Woocommerce pagination inside shortcode?

I have a shortcode that shows the orders history placed by user. It works, however I have pagination with WP_Query which is not working. When I click on any page number the same page is reloaded, the ...
user avatar
  • 101
0 votes
1 answer
21 views

using is_paged for hiding image on posts

In my posts I'm using <!--nextpage--> in order to paginate specific blog posts, which works fine. But my issue is that the featured image shows in the post header for each page. I've tried using ...
user avatar
  • 113
0 votes
1 answer
14 views

Only show featured image on first page of paginated posts

I'm experimenting with paginated posts on my site using the SmartMag theme, and I've customized my post content template quite a bit. However, I still have one issue I'd like to fix: On paginated ...
user avatar
  • 113
0 votes
0 answers
10 views

How to Show Next-Previous Link Only

I can not figure out how to keep Next and Previous links only and remove page number links. I also tried using this: previous_post_link(); next_post_link(); But it's not working. While using the ...
user avatar
0 votes
1 answer
19 views

get_query_var('paged') return 0 in custom category page

I want to make a pagination for my category page (category is related to custom post type) But I can't get current page because it returns 0. $term = get_queried_object(); $paged = (get_query_var('...
user avatar
0 votes
0 answers
30 views

custom taxonomy pagination 404 error

I know this question has been asked a lot, and I have been searching for solutions and trying what I found but I am still having issues. When I click on page 2 I get the 404 error For example, I have ...
user avatar
0 votes
1 answer
35 views

Custom archive page for custom taxonomy and pagination issue

so this is something I am trying to figure out for quite some time about my custom archive page for a custom taxonomy 'workplace'. There is many workplaces, and what i want is to display the products (...
user avatar
  • 16
0 votes
0 answers
32 views

Why is my pagination /page/2 taking me to index.php?

Why does my pagination take me to sites front page instead of page 2. The url seems to be correct mydomain.com/category/categroyname/page/2 but it doesnt display posts for 2 page. I tried to reset my ...
user avatar
  • 101
0 votes
0 answers
35 views

Function the_posts_pagination() not compatible with WP_Query arguments

I trying to make a list with posts from specific category. It's supposed to work as the loop in category.php file. Unfortunately i have problem with pagination links which are completely not ...
user avatar
  • 145
0 votes
0 answers
16 views

How do I hide a Gutenberg block when paginating

I've created a homepage, using Gutenberg blocks which paginates my posts beautifully. I have a text block for SEO purposes that I only want to show on the first page (the homepage) and want to hide on ...
user avatar
  • 101
0 votes
0 answers
49 views

Rest API Paginate until all posts are imported

So I wanted to see if someone might be able to help me with this, so below I will explain what I've done: I am using wp_remote_get to grab the posts from another website with the arguments page and ...
user avatar
  • 21
1 vote
1 answer
99 views

How to add numeric slug for child page in WordPress 5.9?

I am trying to configure WordPress 5.9 to allow numeric slugs for child pages. Drawing from the 2015 answer to a similar question I took the up-to-date code of wp_unique_post_slug, removed || ...
user avatar
0 votes
1 answer
33 views

get_query_var('paged') for WP_Comment_Query always return 1 when using paginate_comments_links()

I'm having a problem getting 'paged' query_var for my comments section in CPT post. I'm using this code to query comments: // Comments per page $comments_per_page = get_option('comments_per_page'); //...
user avatar
0 votes
0 answers
35 views

Sticky posts limit query and pagination for a custom post type

I would like to display 9 posts per page. But, when I have a sticky post, I would like it to be integrated in the 9 posts in the query. And, then, for the second page, I continue to have the next 9 ...
user avatar
  • 1
0 votes
0 answers
35 views

Wordpress paginate_links function: How do i ensure the page number is not less than 1 and not greater than last

I have a $wpdb query that selects all rows from MySQL table written in a custom php file. The query returns 2122 results. I have set the the code to output 20 rows per page which means i have a total ...
user avatar
0 votes
0 answers
14 views

Pagination in custom post type archive.php not working

// Get Limited Posts per page $args = array( 'post_type' => 'portfolio', 'posts_per_page' => 3, ); $posts = new WP_Query($args); function.php // Create Pagination function ...
user avatar
0 votes
1 answer
19 views

Pagination on template page for custom query redirecting to index.php

I'm building my first theme and have a template page "page-blog" with a custom wp_query. I've tried adding pagination to the query but so far the pagination redirects to the index page. As ...
user avatar
0 votes
1 answer
30 views

Blog Posts - Scroll to view more

I have a page with all my blog posts in it and I have it set to show all my posts on one page. (See screenshot) Now am I looking for away to only show 10 posts at a time and on scroll show more. I see ...
user avatar
0 votes
0 answers
40 views

Wordpress Pagination - 301 Redirect Issue

I have this wordpress problem with pagination and redirects. Let's take this scenario - I have a blog on my website and it has a lot of articles, therefore the blog expands to /page-35/. Let's say ...
user avatar
1 vote
0 answers
19 views

Unreadable pagination

I act according to the Output of posts There is a file blog.php <?php /* Template Name: Myblogpage */ ?> <?php get_header('third'); ?> <!-- Content ==========================...
user avatar
0 votes
1 answer
25 views

Getting blog pagination to work on page set as front page

From what I understand, if the page is the front page (using front-page.php) you would use get_query_var('page') and for other pages you would use get_query_var('paged'). I have a condition for this ...
user avatar
  • 105
0 votes
1 answer
64 views

porto theme pagination on woocommerce not working

here i use code shortcode of woo commerce and whenever i reload page pagination showed up then hide i used this code [products limit="12" columns="5" paginate="true" ...
user avatar
0 votes
1 answer
65 views

Custom ordering of CPT items not matching with the ordering of its pagination

I have a CPT and I am changing its ordering by a numeric value of a custom field. My custom field name is "ordering". The ordering of my CPT is changed like this: $posts = get_posts(array( ...
user avatar
  • 119
0 votes
0 answers
27 views

Understrap Custom Pagination

I am using the great Understrap and I am using a custom post type (for my Staff). In my Staff CPT, the Title field is used for "First-name Last-name". Example, "John Smith" is one ...
user avatar
  • 119
0 votes
0 answers
36 views

Problem with pagination block in Gutenberg

I’ve built a site using Gutenberg (I wanted to avoid any other page builders) but I needed custom blog page so I created it too – and there is the problem. So basically I have multiple tabs with ...
user avatar
0 votes
0 answers
28 views

Pass global variable from Page 1 to page 2 (Pagination)

Ultimately to keep it real simple, on a custom query page, I have a global variable that I pull from a previous page. When I go to page 2… the global variable is blank. Page 1: Define global variable....
user avatar
  • 125
0 votes
0 answers
18 views

Pagination on page 2+ only

So here is the code I have <meta name="robots" content="follow, <?php echo (get_query_var('paged')==1)?'index':'noindex'?>" /> I am trying to have it set to only ...
user avatar
0 votes
0 answers
29 views

Pagination links for custom post type shows correct number of links, but links result in Page not found

This topic has many similar posts, but I'm not finding one that addresses my issue precisely. Here is what I have done so far: I added a Custom Post Type to functions.php. This works. The imported ...
user avatar
0 votes
1 answer
33 views

Custom Taxonomy terms with latest post ordered by date pagination issue

I'm using the similar code from this question, order terms by post date works only if I display all the terms on the page, example terms_to_display = 99999, but if I set it to 6 or for example, the ...
user avatar
  • 146
0 votes
0 answers
58 views

adding pagination to a foreach loop in wordpress

Am looking for a way to implement pagination on my categories I tried to use paginated_links(); functions but it works only for posts, and not the actual categories. I have looked around and it seems ...
user avatar
0 votes
2 answers
111 views

First archive page with a few posts

I'm looking for a way on how to display only a few posts on a first page of my archive. This is my archive template — page-archive.php, which I am using as a template to display all my posts/recipes: &...
user avatar
0 votes
0 answers
64 views

Help to modify wp_link_pages()

My site has the Newspaper theme by tagDiv, which installs two necessary plugins to make things work better. These plugins are Composer and Standard Pack. I'm trying to modify the default wp_link_pages(...
user avatar
0 votes
0 answers
40 views

Pagination for custom post type giving 404 error (but only for news page)

Before you say this is a duplicate of another question please hear me out. I have a custom post type on a site I'm building. When adding pagination to the page (domain.com/news) it gives me a 404 ...
user avatar
1 vote
2 answers
49 views

Create ONE callback for all page templates, post filter queries + paginated pages, triggering pagination via AJAX

I'm querying posts using the following wp query: function custom_retrieve_posts_function() { $paged = get_query_var( "paged" ) ? get_query_var( "paged" ) : 1; $args = array( ...
user avatar
  • 286
0 votes
0 answers
26 views

How Change URL in Pagination pagebreak no plugins wordpress?

i’m newbie wordpress developer and I have a problem with my pagination URLs, default url pagebreak wordpress like this https://stagingforweb.donot.net/perencana-keuangan/cara-tepat-klaim-asuransi-...
user avatar
1 vote
1 answer
48 views

Pagination with WordPress default gallery?

Here is the part of code handling pagination in functions.php: // Pagination Setup $current = (get_query_var('paged')) ? get_query_var( 'paged' ) : 1; $per_page = 3; $offset = ($current-1) * $per_page;...
user avatar
  • 11
0 votes
0 answers
39 views

Show the number of the post

I'd like to show the Number of the post near the post in a category. It's simpler to explain with a drawing than with words: My first solution was a simple counter inside the loop, but it doesn't ...
user avatar
0 votes
1 answer
43 views

How to create pagination on archive.php template

I'm creating a custom theme and I'm struggling to get pagination working on my archive.php template. I've tried to adapt the code I'm using on my main blog page, but it's simply displaying all blog ...
user avatar
0 votes
0 answers
90 views

How to replace pagination with Next/Previous for multi page posts?

I have searched but could not find code to replace the pagination from 1 2 3 4 5... etc. Into "Previous" "Next", for multi page posts. What I find are solutions to do this for ...
user avatar
  • 13
1 vote
0 answers
25 views

Last page in pagination does not match max_num_pages - the overall post count is less according to pagination

I'm using paginate_links() to display my posts pagination like this: $paged = get_query_var('paged'); $current_page = max(1, $paged); $custom_query = array( 'post_status' => 'publish', '...
user avatar
  • 11
0 votes
0 answers
28 views

pagination 404 error, same slug home and categories

I would like to change the permalink for categories. I configured thé prefix of categories with actions I have a page for the home page wich have a slug actions All the website worked correctly. URL ...
user avatar
0 votes
0 answers
20 views

Setting up Pagination with twentytwelve_content_nav

We are using the twentytwelve theme and I've been trying to fix and set up Pagination for few specific pages. I've set up a Webserver and freshly installed wordpress for this. I managed to get it to ...
user avatar
0 votes
1 answer
33 views

Why does my WP_Query pagination on a custom page.php only loads the homepage?

What I am looking to do: Setup WP_Query pagination in a custom php template file with a custom WP_Query query (It's not originally mine, I'm just fixing it). The file loops through posts (category &...
user avatar
  • 1
0 votes
0 answers
56 views

How do I get pagination for get_posts() in WordPress or do I have to rewrite the whole code?

I inhertited a WordPress page with a long post list on one page that uses get_posts(). I need it to have pagination to not load all the posts (images, content) at once. Would I have to rewrite ...
user avatar
  • 1
0 votes
0 answers
18 views

how to show all posts of each category in pages

Although found many questions and answers about showing all posts in categories, I can't achieve this: Show all posts from each category in as many page as my sites glows. Let's says we have a site ...
user avatar

1
2 3 4 5
36