Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
60 views

Page links are not working after moving domain [closed]

Recently, I have moved a domain for my wordpres. But facing some strange problems: [0] OS - CentOS [1] All the pages/notices/media are not showing on admin; though they are all in database. [2] The ...
-1
votes
1answer
75 views

Show pagination in WP_Query

I'm coding a foodblog and I'm trying to show favorite posts list in a specific page but I have some issue with pagination. I've tried different solutions searching in previous questions but nothing ...
0
votes
0answers
99 views

Custom Post Type Pagination - not displaying posts

I seem to have run into a massively common problem, and found about 956 solutions to the issue that didn't seem to knock this one loose. I have a client with a WP site built on Divi theme. And i ...
1
vote
1answer
321 views

Offset Page Loops and Pagination

I have really been struggling with getting the main loop for the index.php to work properly with WP_Query functions. I need the grid array of 6 featured images at the top to not be offset at all, ...
0
votes
2answers
1k views

Category template with pagination returns 404 on next pages

I am making a category template page with pagination and below is my code: <?php $current_page = get_queried_object(); $category = $current_page->slug; $paged = get_query_var( 'paged' ) ? ...
-1
votes
1answer
22 views

Pagination Error - Same Posts Displaying Over Again

<div class="col-sm-10"> <div class="row"> <?php query_posts('offset=1'); ?> <?php if ( have_posts() ) : ?> ...
0
votes
1answer
445 views

Pagination (on the static front page) shows always the same posts

I have a problem with pagination on my front page. I want to show all posts from a specific category and paginate them. Here is the code if ( is_front_page() ) { $paged = get_query_var( '...
0
votes
0answers
713 views

Pagination while keeping the filters

I code a page that shows the post results with a couple of filters (the visitor can filter by country and time) and the result is paginated: $posts_per_page = 10; $paged = ( get_query_var( 'paged' ) )...
1
vote
2answers
128 views

How can i change the output of posts_nav_link();

I would like to change the output of posts_nav_link(); ( Or be pointed in a new direction, that's fine by me ) What i want to do is show < Previous archivepage| Next archivepage > even if ...
0
votes
1answer
41 views

Change the number of plugins counted on wp-admin/plugins.php

I have successfully hidden my plugin from the plugins page using $wp_list_table however the pagination at the top still lists plugins as 'All (3)' etc. I managed to successfully alter the $...
0
votes
1answer
34 views

Linking images in WordPress Paginated Post

I have a paginated post on WordPress with about 5 pages. I want to set it up so that the images in the content from the previous page automatically link to the following page. I've used the following ...
0
votes
1answer
44 views

Pagination adds search query (again)

I have created a custom search form. That works perfectly. I have added pagination. That also works (almost) perfectly. Now if I have the following search query/url http://domain.com/?s=&ssd=1&...
1
vote
3answers
2k views

Pagination on a custom post type loop

I've read a lot of questions about this topic. None of them solve my issue. Poblem: pagination is shown at page 1 but page 2 returns 404. The query and loop are in front-page.php: // WP_Query ...
0
votes
2answers
54 views

How to get a clean pagination link without variable

This is my Code if($totalPage > 1){ $customPagHTML = paginate_links( array( 'base' => add_query_arg( 'cp', '%#%' ), 'format' => '', 'prev_text' =>...
1
vote
2answers
586 views

Edit pagination text in the get_the_posts_pagination function

I want to edit the screen_reader_text in link-template.php Can I do this in a theme so it wont get overwritten on update. It seems a filter is the best option but I cant find documentation on what ...
0
votes
1answer
49 views

Creating multilingual glossary for WP

I'm trying to create multilingual glossary using WP & WPML & custom post type. And I found solution to achieve this. Link to the page example - link 1) Added to functions.php function ...
0
votes
1answer
204 views

How to use pre_get_posts to alter posts_per_page of category pages, where 'posts_per_page' will be dynamic

I have Category templates with custom fields in Edit Category page of WordPress. One custom field there is to put How many posts per page to show in the category page. I am using pre_get_posts to ...
1
vote
1answer
212 views

WordPress rewrite rules for pagination on search page

So far, I need to build a custom search slug e.g by default its: example.com/?s=cat I changed it to example.com/store/query using following rewrite rules inside function.php file function ...
0
votes
1answer
31 views

How to Handle Going Backwards in Navigation When Referrer in PHP/JavaScript won't work?

The site in question is: https://liquidchurch.com/messages/messages-app-view/ Click on any of the series images on this page and you'll be taken to that individual series' page: https://...
0
votes
0answers
35 views

Pagination with a custom post type

I'm having trouble and got stuck on trying to implant pagination inside my custom post type. I've done research from here with little to no luck, I've surfed the already answered questions here, yet I ...
0
votes
1answer
64 views

Code to display random ordered posts in Categories across pages [duplicate]

I need to display in random order posts in multiple categories that have multiple pages. Example - 100 posts in an Automotive category with only 20 posts displayed per category page - the order is ...
0
votes
2answers
1k views

Use WP pagination functions on a custom page template

I have a custom page template, I'm using a standard WPQuery to fetch the posts from the default posts custom post type. I'm looping through all the posts however now I have more posts than I allow in ...
0
votes
1answer
51 views

next and previous category name and link parent only wordpress in archive page

how get next and previous category name and link parent only wordpress in archive page I tried a lot but worked by fetching an ID and adding 1 or losing 1 But this is causing my mistakes
-2
votes
1answer
121 views

Pagination for custom post type on multisite not working

I have added code to paginate posts, but it seems like it's broken or not working on not reset or simply depends on multisite installation. Take a look. Many thanks: <?php /*template to display ...
-1
votes
1answer
35 views

Wordpress post pagination on custom template not working

I've copied the code from the Wordpress documentation on adding pagination to a custom query using 'paged' => $paged. However, on my page it's not working. What am i doing wrong?? <?php ...
0
votes
1answer
890 views

Count posts for pagination

I'm doing the pagination for a web. < Previous (pagenumber) Next > is easy, already done. But now I need to add a selector to go to a page directly (ex: to page 7), to do so, I need to know how ...
0
votes
2answers
56 views

Shortcode with pagination advancing multiple queries

I have some shortcode that I am using. The shortcode itself is working. The shortcode has pagination because it's cycling through a picture gallery. The pagination itself works, but when it advances, ...
0
votes
1answer
41 views

Set Pagination count according to post count

i have created a php template for a page and displaying posts from my custom post type, but i am skiping posts according to the followed condition. so this is my page template code. $paged = ( ...
1
vote
2answers
268 views

Shortcode pagination not advancing

I have a picture gallery that is working, I am converting it to a shortcode so the positioning can be flexible and I don't have to copy the code over and over again. The issue I am having is that the ...
1
vote
0answers
225 views

WordPress pagination not working on template search.php

I have a small issue, pagination doesn't work on search.php. I query the results with wp_Query using the code below, I get to see the page link but when I press them I get 404 error. I was told that ...
1
vote
1answer
185 views

Cutom wp_query for geolocation search, pagination not working

I have a custom search form that ends up on a page-template.php which then performs two WP_Query's. This is for a real estate where each property CPT has a long / lat value set via ACF. The code is ...
0
votes
3answers
4k views

remove default pagination on woocommerce shop page

how can I remove default pagination on woocommerce shop page ? and then use my custom pagination (or use pagination plugin) on woocommerce shop page thank you
1
vote
1answer
34 views

paged > max_num_pages won't throw 404

I've created new page in WP administration called Blog and created custom page template for it. In the template, I have a simple paged custom query. $query = new WP_Query(array( 'post_type' => '...
0
votes
0answers
1k views

WP_Query with ajax filters and pagination

Got working ajax filters and working pagination. But they working only if one of em disabled. Just dont know how to save working pagination without clearing ajax filter. Here is html code for form ...
1
vote
1answer
949 views

How to Get Page 2 / Paginated RSS Feed with Custom Permalink Structure?

I'm trying to get pagination working for my RSS feed. The issue is that my permalink setup is a custom structure: /%postname%. With permalinks back to default, /?feed=rss2&paged=2 works. But ...
0
votes
1answer
334 views

Added .html to Woocommerce permalink but pagination don't work!

I'm recently added this code to my Wordpress website to add .html for my product category. It worked okay with the category (http://mywebsite.com/parent-category/product-category.html) but when I ...
0
votes
1answer
517 views

Custom post type and custom taxonomy 404 on page 2

I have the exact same issue as Custom Taxonomy archive returns 404, I tried implementing the solution but still finding issues... here is my CPT <?php if( ! function_exists( '...
0
votes
1answer
312 views

Why are my paginated posts always returning the same results?

I'm currently developing locally, and trying to get pagination for my posts page set up. At the moment I'm just trying to display one post per page, but of course this will increase in production. ...
3
votes
1answer
295 views

Custom permalink with pagination

I have a custom post type called news and in order to distinguish current and old news posts I have a custom field where the client can mark a news post as 'archived'. So my permalink rewrite code ...
0
votes
1answer
267 views

Append URL query to next post link in custom query

Is there any way to modify the get_next_posts_link function so as to add a query to the URL of that link's href? For example, the default function: $customQuery = new WP_Query(); echo ...
0
votes
1answer
196 views

Custom pagination search in post type with meta key

I am new to WordPress and try to set pagination based on a custom query, by using Query found the result from the meta key custom field and product result. But the issue comes here in pagination ...
0
votes
1answer
268 views

Add a leading zero to pagination

So I'm still new to Wordpress and development in general and trying to add a leading zero to post pagination numbers. The code I came up with is as follows: function leading_zero_wp_link_pages_link( $...
0
votes
1answer
196 views

pagination error in taxonomy: Warning: Division by zero

I'm trying to list a taxonomy in alphabetical order. I've found west code to do it but it gives throws an error: Warning: Division by zero functions.php if( !function_exists('a_z_pagination') ){ ...
0
votes
1answer
61 views

Paging works correctly on local version, but not live?

So, I have a custom loop on my homepage: function homepage_loop(){ $custom_loop_args = array( 'post_type' => array( 'post', 'review', 'video', 'feature' ) ); $custom_loop_args['paged'] =...
0
votes
1answer
278 views

I want to create pagination for my custom post type archive that i am displaying with loop

I have created a home.php file and in that i am showing my custom post type "projects with the WP-Query". I have added pagination to my custom post type using "paginate_links()" and the list shows up ...
0
votes
1answer
404 views

Getting rid of role=“navigation” in the Home Page Pagination

For the Pagination on the front page ort the Homepage I am using this one → <?php the_posts_pagination( array( 'mid_size' => 2 ) ); ?> Codex Reference #1 Codex Reference #2 In the actual ...
0
votes
2answers
353 views

How to add pagination to a post loop in a custom BuddyPress tab

I created a new tab called "Videos" inside of the BuddyPress Profile page. This tab contains all video posts added by that user. The problem is that it only shows the first 12 posts and the pagination ...
0
votes
1answer
483 views

Ajax Load More on Hierarchical Categories

I am developing a plugin where I have to add Ajax Load more. The page where I need it is Taxonomy Archive Page. Everything works fine if there is no child categories but whenever child category is ...
0
votes
0answers
270 views

Get current_post in reverse order with pagination

I'm trying to index my posts (in reverse) and I'm using current_count within loop to do this. This is my code: <?php $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $args ...
1
vote
1answer
359 views

Pagination links missing for first link (1) and previous button? How to get pagination links to work?

I'm trying to add pagination to my WordPress query using pagination_links() however I am getting no links returned for my page 1 links and previous link? Other links are adding the paged query string ...