Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
3
votes
2answers
2k 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 ...
0
votes
0answers
23 views

Custom pagination permalink structure Product page

I'm using WooCommerce. And WC has an ugly link structure /product/category-name/product-name. I removed /product/ from the url. But now I'm facing an issue. On the product page reviews are shown, when ...
1
vote
4answers
504 views

Pagination is not working in custom post type

I want to add pagination in single page of custom post type. This is the code for single page (custom post type): <?php $paged = get_query_var('paged') ? get_query_var('paged') : 1; $args ...
0
votes
1answer
484 views

Pagination not working on homepage

I tried multiple solutions but its not working. When I go to /page/2, it doesn't work. I'm executing custom query in index.php of my theme. if ( get_query_var('paged') ) { $paged = get_query_var('...
0
votes
0answers
15 views

How to get post from all custom post_type multisite to the main site with pagination ordered by date?

Currently this is my WordPress Multisite: Main site -Sub Site -Sub Site -Sub Site -Sub Site and this is the example code for getting all post from multisite : foreach( $blog_ids as $id ) { ...
0
votes
2answers
489 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 ...
1
vote
1answer
27 views

Pagination not working in custom page, only working in post page

global $wp_query; $result = $wp_query; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $original_query = $wp_query; $wp_query = null; $args=array( 'post_type'=> 'post', '...
0
votes
1answer
463 views

Custom Select Query pagination not working properly

I have Custom Select Query joining two tables and displaying events older than current date. Everything works fine until I try to paginate it. <?php global $wpdb; $date = date("Y-m-d");...
0
votes
2answers
69 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
93 views

get understrap pagination to work with custom query

I am using the excellent understrap Wordpress boiler plate theme. It has a pagination function that works if you put inside a standard loop like so: <?php if ( have_posts() ) : ?> <?php ...
1
vote
1answer
630 views

Pagination in plugin's backend

I am displaying a list of posts in the plugin backend but I can't seem to get the pagination to work. I used the standard approach of getting the "paged" variable and then passing it to get_posts()'s ...
1
vote
5answers
12k views

How to change title tags on paginated posts?

I've created many post with multiple pages with the nextpage-tag. The problem is that these show up as errors in "Google Webmaster Tools" because of duplicate title tags and meta descriptions. The ...
2
votes
1answer
735 views

Wordpress custom URLs for pagination pages

I’m trying to find a way to make custom URLs for each pagination page separated by <!--nextpage--> tag. For example, if the first page is: myblog.com/my-topic/ the second one will be: myblog....
0
votes
1answer
71 views

Pagination Not Working on `WP_Query` Archive Page

I have an archive page that pulls two different custom post types into an archive using WP_Query(). Because there is a home page to the site which shows 9 of the custom post type posts, I offset the ...
-2
votes
2answers
20k views

Pagination Using ajax

I want to use Pagination using ajax for custom post taxonomy. Many of codes are tried by me but at the last I was failed. So,how can i use pagination using ajax without plugin? When i am clicking on ...
4
votes
1answer
791 views

Pre get posts for single post

I pre get posts for a events archive page: http://www.netzwerk-leipziger-freiheit.de/veranstaltungen/ function my_pre_get_posts( $query ) { // do not modify queries in the admin if( is_admin() ){...
12
votes
2answers
10k views

Have different number of posts on first page

I need to have a different amount of posts per page on the first page that on the other pages. For example, this is what I need Total posts: 6 First page: showing 3 posts Following page: showing 2 ...
2
votes
0answers
32 views

How to output different posts per page?

I want to display one blog article less than on the following pages. The following code works but the the paginaton on the first page displays 1, 2, 3, 4 and on the next pages i get the correct ...
0
votes
0answers
18 views

Remove pagination pages of Wordpress Blog from Google Search Index

I have tried adding rel="prev" and rel="next" to the pagination. But the pagination pages pages still appear on Google Search Index. I want to remove them but Yoast SEO doesn't have the functionality ...
2
votes
2answers
16k views

Numeric pagination custom post type

i create a custom page to display loop of cpt with custom field. I need to add a numberic pagination and i try with this code but not work. Functions.php function pagination_bar() { global $...
0
votes
1answer
568 views

offset and max_num_pages in pagination gallery

I rewrote the code galleries and stopped at the pagination. How can I get the maximum number of pages? at the moment I can not define it, and put a test for the number 5. (Here "for ($ i = 1; $ i &...
1
vote
1answer
449 views

Pagination - works on local but not live dev!

Can anyone please shed some light as to why the following to print out page numbers works on my local dev server but not on my live server? Both server are running same version of PHP. My Loop <?...
1
vote
0answers
28 views

Get the number of posts shown in the current page

I am currently trying to implement a load more function described in this stackoverflow post, and in order to do so it is necessary to know how many post have been loaded already. Thus, I am trying to ...
0
votes
1answer
35 views

how can I do numeric pagination?

How can I do numeric pagination? <?php $args4 = array('post_type' => 'post', 'showposts' => 99, 'cat' => 23); $loop4 = new WP_Query($args4); while ($loop4->...
0
votes
1answer
599 views

How to limit page pagination… again

I'm digging out on old question as no solution came out. How to limit page pagination I'm looking for a way to limit pages on homepage and categories (archive.php). I have around 200k posts spread ...
0
votes
2answers
902 views

Wordpress pagination not returning posts on second page

I've got a page where I only want to display one post per page with pagination at the bottom to go to the next/ previous post. This is my code: <?php $paged = ( get_query_var( 'paged' ) ) ? ...
0
votes
1answer
442 views

Pagination 404 Not Found child page

I have a page Heemtijdinghen displaying custom posts (post_type=artikel) paginated. The page is a child page of page Publicaties: /publicaties/heemtijdinghen/ When navigating to e.g. page 2 a 404 Not ...
0
votes
1answer
86 views

AJAX numerical pagination problem in TwentyFifteen-child theme

I want to create an AJAX numeric pagination. And found code in a website. And it works perfectly at first click event, but on the second click it doesn't. If I click in pagination page 4, it works ...
3
votes
1answer
3k views

paginate_links ignore my format

I need the pagination liks to have the url, like: current_url?p-page=1 current_url?p-page=2 current_url?p-page=3 And so.. The reason I need this is because I have other params in the page. the ...
0
votes
0answers
15 views

Numeric Pagination on custom post page [duplicate]

I have a custom post page like this: <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array("post_type" => "post", "post_type" => "viaggi", "orderby" => "...
0
votes
1answer
480 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( ...
-1
votes
1answer
30 views

Pagination in category.php not functioning

Original Url: https://www.something.com/category/ftm-atf/ When I add pagination in, the following url is generated which results in a 404: Paginated Url: https://www.something.com/category/ftm-atf/...
9
votes
10answers
39k views

WordPress /page/2 404 pagination problem - what to do?

I came across the /page/2 404 pagination problem and tried to find a solution. I've read some suggestions, but it didn't help yet. Working: http://pandasnacozinha.com.br/bolos-doces-e-sobremesas/ ...
0
votes
0answers
9 views

Updated WordPress and Pagination on page stopped working properly

The PageNavi plug-in is only showing squares. The links in the squares work and bring me to next page. But why can’t I see numbers? I’ve tried multiple different plugins and none work.
0
votes
1answer
567 views

Reverse ordered pagination on home page

Use on the blog reverse pagination. The question arose. How to make a home page is not the first? Need to break the link Home = First page and make a connection Home = Last page. Home should be the ...
11
votes
7answers
21k views

Get current URL (permalink) without /page/{pagenum}/

How can I retrieve the current URL (whether homepage, archive, post type archive, category archive, etc) but always without the /page/{pagenum}/ part if it's present? So, if the real URL is: example....
0
votes
1answer
49 views

Remove custom taxonamy slug with pagination

I have added the custom taxonamy for my faq site. I want to remove the default custom taxonamy showing in url for archive page. I have tried some codes, but it's break my pagination. function ...
0
votes
1answer
509 views

Add Custom Pagination Permalink

I'm trying to create a page with multiple loops on it and as such also need multiple pagination. This is proving to be a touch difficult, I've managed to get the links to show correctly by using the ...
0
votes
1answer
36 views

pagination problem listing custom post types of taxonomy in wordpress

I am trying to list a set of products which match a taxonomy terms. The list of the products is fine, but I can't figure out the pagination of my custom posts. I have been looking for information in ...
0
votes
1answer
43 views

ajax load more instead of pagination

<?php if ( ! defined( 'ABSPATH' ) ) { exit; } global $wp_rewrite; $wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1; $pagination = array( ...
0
votes
0answers
94 views

Pagination is not working properly in Product Category/Tag pages

I have a store with several products. Pagination works fine on the main shop page. But when I open a separate product category or product tag pages, in some of them pagination not working as expected....
0
votes
1answer
602 views

Paginate Links in Wp Query Shortcode

so been looking around for this answer, but no go -- basically i have a WP Query that is incased in a shortcode.. I have set up the paginate links function which outputs it on the page. However, the ...
0
votes
1answer
621 views

Pagination not working on my archive page for a custom post type

First off I have a custom post type called events, and I wrote a custom query in in my archive-events.php file. Everything is working great except for the pagination. To trouble shoot I stripped ...
0
votes
2answers
2k 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. ...
0
votes
1answer
1k views

Problem with custom WP_Query and underlying pagination/posts_per_page

In my category template (category.php) I have the following code: <?php // Setup custom loop -- we need to exclude featured posts from listing so they aren't repeated $paged = get_query_var('paged'...
0
votes
0answers
44 views

paginate_links redirects to wrong url structure

I'm paginating a custom post type on a custom page. The content of the page is determined by a custom query, like this: mysite.com/my-account/?sect=orders When I change sect= to something else the ...
1
vote
2answers
862 views

get_next_posts_link not working without parameter max_num_pages

I have a custom search page (searchpage.php) using pagination, and I am tring to add lines like below dynamically to my header.php inside <head></head> tag for better pagination SEO. <...
0
votes
0answers
18 views

Wordpress Pagination for Custom Post Type returns Same Post on every Page

The Pagination for my custom post type returns the same posts on every page. Like when hovered over the pagination like the link shows domain.com/android/page/2 but when clicked it returns to domain....
0
votes
1answer
62 views

How to hide empty pagination button when no previous page

I've styled my pagination buttons to have a green background. When there is no previous page (or next page) the pagination link disappears for good reason but it leaves a green empty button with no ...
0
votes
1answer
2k views

pagination in woocommerce order history page

Please help me to add pagination in my order history page. Pagination should work like WooCommerce products page. Here is my code: <?php $customer_orders = get_posts( apply_filters( '...

1
2
3 4 5
34