Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Why can i add /page/674874 (or any number) to a URL and it still pulls up that page?

I have noticed that on any WordPress site you can add /page/7863/ (or any number) to any page url and it still shows that page and not a 404. Why is that? (Asking because my SEO company sends reports ...
1
vote
0answers
27 views

How can I use var php with javascript to build custom page?

is variable increment in $post_per_page = 10 if click on button next I can increase $Post_per_page = by_call <button type="button" value="increment++" >Increment </button&...
0
votes
1answer
10 views

GoBlog Free Pagination Issue

First time poster, my name is Johnny. :) I've built an archive page for my website that I'm very proud of (using Elementor), but I don't want the homepage of this theme to paginate. I want the ...
0
votes
0answers
20 views

How to get pagination to work despite naming conflict?

I have been stomped for the past two days trying to understand wordpress' permalink structure. Right now, I have a a custom post type called venue and I have a custom taxonomy venue-type (e.x. hotels, ...
0
votes
0answers
23 views

Changing posts per page on home page breaks pagination on home only

I'm pretty much a beginner here and have a bug in my website. I have a grid layout of 4 x 4 with a static post as my first one on the home page. It displays on the homepage only using <?php if(...
0
votes
0answers
19 views

Inject pagination parameters into permalink structure

My goal is to add a parameter to every pagination permalink: domain.com/blog/page/2?pageid=2, domain.com/blog/page/3?pageid=3 in order to tell Google to index all of the above as domain.com/blog/ ...
1
vote
0answers
21 views

How to disable redirect on pagination first page

When I pagin to my.site/mypage/page/1 its redirect me to my.site/mypage/, i try to disable it on (template_redirect, do_redirect_guess_404_permalink, redirect_canonical) hooks but it not help here is ...
1
vote
0answers
6 views

Pagination not visible on woocommerce's category page

I am not able to display pagination on the category page on woocommerce, I have 18 products in a category but when I customise the rows and columns, it shows only a certain amount of products. I want ...
0
votes
0answers
15 views

Search results with pagination not working

I've got a news page with a search bar functionality. On this page I want a user to be able to enter a term and the contents of that page will be updated depending on what the user has entered. I don'...
0
votes
0answers
8 views

How to easily exclude first post in pre_get_posts only in queries other than page 1?

In home/category pages (blog), I need to have 4 posts in first page, then 3 posts in all other pages. Problem is, I cannot simply alter posts_per_page, because in following pages I would have wrong ...
0
votes
0answers
17 views

Pagination repeating posts on search results

i have a problem with my wordpress search result pagination. Basically it's working as intended until i hit page 2, it then repeats the results of page one. Here is my search.php, please excuse the ...
1
vote
0answers
11 views

Site pagination issue

The site wont go past the first page it redirects back to page 1 this is the code for the template used * Blog Pagination */ function ptp_blog_pagination_bar() { global $blog_query; $...
1
vote
2answers
87 views

Customize “the_posts_pagination” and put list instead div

Hello everybody, I need help with my custom wordpress pagination. I'm looking to get this : This is what I did : in the functions.php, I've add this code : function wp_custom_pagination($args = [], $...
0
votes
0answers
8 views

How to offer a non-paginated alternative version on paginated (single) posts or pages?

@ll; I'm hoping this is not a too stupid question; I tried googling for solutions and found none. Paginating longer posts sometimes makes sense to break them down into contextually coherent sections; ...
0
votes
0answers
15 views

Pagination not working wit custom Query

I have created a custom Query that works perfectly with my custom post type, inside this custom post type I'm showing an archive with other custom post types: One is a city, and inside each city there ...
0
votes
0answers
14 views

Custom query give me 404 when paginate

in my site I have "CPT Clients" and each client has "CPT Success Stories", also I have a list of client's taxonomies, and when access to one of thees, I need to display the stories ...
0
votes
0answers
24 views

How to use paginate_links on front-page.php with a custom post type?

How do I use the function paginate_links in front-page.php or, if I cannot use it as it should be used in front-page.php where it should be better to put it? I have found this post https://wordpress....
1
vote
1answer
25 views

remove paginations functions only on home

this is my full code for index.php <?php /** * The main template file. /* Exit if accessed directly */ if ( ! defined( 'ABSPATH' ) ) { exit; } get_header(); /* Blog layout options via ...
0
votes
1answer
9 views

Paginate Images To Similate Map Drill-Down

I apologize if this is a too easy question for you guys, but I'm newish to wordpress. I am building simple demonstration site and I need to create an image effect that enables the user to click an ...
0
votes
0answers
10 views

error 404 on pagination when modifying a new wp_query argument 'post_per_page'

I'm using WP_Query to generate an archive custom posts type. In the settings of wordpress I have set to 12 the number of posts to see per page. But on this particular archive page I want to see 6 ...
0
votes
0answers
13 views

Pagination not working on archive.php template?

I have an archive.php template which I only use for the blog. The code goes a bit like this: <?PHP $the_query = new WP_Query( array( 'posts_per_page'=>9, 'post_type'=>'blog', '...
0
votes
0answers
24 views

Wordpress subcategory archive pagination in custom layout

I have blog with categories and sub-categories and use category.php for archive of main category posts, and added a custom layout for subcategory archive layout as subcategory.php (with a function). ...
0
votes
0answers
23 views

404 when I combine taxonomy filter with pagination

I have created a custom archive page and I've created my custom post type using CPT. I've managed to add pagination but I have also created a filter using custom taxonomy and when I use the filter ...
0
votes
0answers
19 views

How to stop hiding buttons forward / backward in pagination?

I am doing pagination on my site. For this, I use the get_the_posts_pagination function. Now, the back button is hidden on the first page, and the forward button is hidden on the last page. How do you ...
0
votes
0answers
15 views

WordPress Sub Category Archive, Show Extra Empty Page Number in Pagination

This my code for sub category archive page: <?php // the query $the_query = new WP_Query(array( 'category__and' => array( 2 ), ...
0
votes
0answers
11 views

Wordpress pagination for custom page template for custom query

I am pulling all the default posts in a custom page template using a custom query and custom loop. Things to mention here is that I have several custom query on the same page. All those queries are ...
0
votes
0answers
8 views

How to insert html code in to a specified pagination number?

I wish to put a banner into an exact pagination number, example: h@@p://mysite.com/category/categoryname/page/370/ is that possible?
0
votes
0answers
6 views

Cache is accumulating /page/<number>, copies of home page

I recently started using a caching plugin. I noticed it started caching /page/2/, /page/3/, etc., and they are all copies of the home page. If I browse to a new page number, it shows the home page ...
0
votes
0answers
13 views

previous_posts_link & next_posts_link doesn't generate any output

Hey I am using a WPQuery to loop through and show blog categories in posts. It's in a page tempplate. has 21 posts and I want them to show 10 per page with navigation links for next pages of 10 posts ...
0
votes
1answer
19 views

Wordpress blog pagination not working

Please let me know if anyone know .. <?php $per_page = 6; $paged = get_query_var('paged') ? : 1; $offset = (1 === $paged) ? 0 : (($paged - ...
0
votes
0answers
48 views

How to make a pagination with dropdown selection?

This is the code for the dropdown pagination. It uses a js controller too, but it works fine, so, I’m not adding it. $total = $wp_query->max_num_pages; // only bother with the rest if we have more ...
0
votes
0answers
21 views

Wordpress pagination broken for page 2,3 with custom permalink. Redirects to baseurl

I have a forum installed with my Wordpress site. My pagination does not work and redirects pages 2,3, or more to baseurl when they are on homepage. Here are the settings: Forum baseurl: https://...
0
votes
0answers
19 views

Pagination counter like < 1/2 >

I am learning to develop in wordpress. I want to create a custom pagination, with a counter like function to display my blog posts. This is how I want it to look like: This how it should function: ...
0
votes
0answers
10 views

how to display next previous pagination on custom page?

I tried to add pagination my custom page, the pagination number appears but there is no next and previous pagination. function.php function pagination($pages = '', $range = 4) { $showitems = ($range ...
0
votes
0answers
22 views

White screen of death on index.php page 3 and above?

I am experimenting with custom loops and following the tutorial of the illustrious Chip Bennett, and I actually got everything to work on index.php! ... Up to, that is, page 3. Everything works lovely ...
0
votes
0answers
13 views

using custom paged variable in get_previous_posts_link() function

Is there any way to use a custom paged variable in get_previous_posts_link function? I have two different custom loop on one page and need to have two different and independent pagination for these ...
0
votes
0answers
14 views

WordPress pagination problem on merged queries

I have merged queries in search.php with custom post types. This is my scenario when user search to "math", the main query is searching in the post title, post excerpt, and post content. Now ...
0
votes
0answers
13 views

WP_query pagination on frontpage

I'm trying to make a pagination for a WP_Query on a frontpage using the paginate_links() function and following the codex (https://codex.wordpress.org/Pagination#Static_Front_Page). The pagination ...
0
votes
0answers
8 views

Post pagination links ordered by meta value

Is there a way to order the nex-previous post links, or any other pagination function to get the links ordered by meta value, like I have done in the posts listing page shown below? $events = ...
0
votes
0answers
33 views

Custom pagination with URL parameters

I want to use URL parameters to define pagination pages like this /blogroll/?page=1, /blogroll/?page=2, /blogroll/?page=n.. instead of the conventional Wordpress way /blogroll/page/2/ In the same time,...
0
votes
1answer
22 views

Wordpress /page/2 gives 404 when custom permalinks is set to %category%%postname%

My wordpress permalink settings, Custom Structure: %category%%postname%. Used next_posts_link() in custom theme in archive.php to get next posts link. Result: Next Page >> (display as expected) ...
0
votes
0answers
19 views

sticky posts and pagination issue

Why is this query repeating sticky posts on the second page? Also, the first page does not contain only sticky posts. Note: number of sticky posts is 30 and I want the firstpage to show only stick ...
0
votes
0answers
29 views

How to get rest api pagination headers via fetch

I'm creating a react app via create-react-app. My application is very simple, I just want to fetch posts and display the images and the post title. I can't seem to be able to get the pagination ...
0
votes
0answers
25 views

Add pagination to custom search

So I took over a site, and the problem being that I would like to add the pagination to the custom search made by the former developers. I have a little trouble to find my way around and I would have ...
0
votes
0answers
32 views

Custom posts per page on first page generates wrong number of pagination links

I've looked at every solution I could find, but everything I've tried seem to have this same issue (although nobody has mentioned it). I have a custom taxonomy with 30 posts in it. Global ppp is 9, ...
0
votes
0answers
60 views

add pagination in wordpress page template

I am using custom page to display my taxonomy terms the terms are displaying fine but i dont want the terms to all show in one page i want 2 terms per page but the pagination is not working and its ...
0
votes
0answers
20 views

Custom Category Pagination shows countless blank (empty) pages

I have a category that consists of 14 pages. But there is a problem. Once you reach /page/14/, you can open blank pages 15, 16, 17, 20, 100, 200 and so on. I would like after page 14, visitors to be ...
1
vote
1answer
219 views

Wordpress 5.5 breaks pagination in an older plugin

I am stuck having to use an older plugin, which is no longer maintained. The problem i'm facing is that in WordPress 5.5, the pagination that plugin uses, breaks. All you see is the first page. This ...
1
vote
1answer
97 views

Not able to rewrite the pagination URL for the posts

My posts pagination in not working in WordPress 5.5 and So, I want to rewrite the URL for the pagination. I am using posts with pagination in the inner page with slug "post". Current URL (...
0
votes
1answer
214 views

Pagination Not Working When Used With WP_Query() `offset` Property

I have an archive page that pulls in posts using WP_Query(). On the homepage of the site it shows 16 of the custom post type posts, so on the archive I offset the archive page by 16 posts. The code ...

1
2 3 4 5
35