Questions tagged [pagination]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
18 views

Is there a way to by-pass the pagination function on one custom template?

I'm working on a site where the client wants only the linked titles of all posts in a particular category on one page. That is, the query does not pick up the smaller number of posts that is defined ...
-1
votes
0answers
17 views

Pagination with custom query

I can't do work pagination in my theme. I use custom query. <?php get_header(); ?> <main id="site-content" role="main"> <?php $archive_title = ''; $archive_subtitle = '...
0
votes
0answers
14 views

Wordpress pagination links with query args

I have set some arguments to the paginate_links function and managed to do pagination with query args instead of path, but on the first page it does not rewrite my arguments, it just keeps the current ...
0
votes
1answer
16 views

Pagination doesnt work in custom post type

Pagination template part includes common pagination function with style.The template part works for archive.php ( its for "single", you know default wp file ) but doesnt work for custom post type. ...
0
votes
0answers
14 views

How to implement pagination in category.php template

I'm creating the category template for a custom theme. With this code I'm able to get the last six posts of the news category, I need to add pagination links at the bottom of the page, How I can do ...
0
votes
1answer
28 views

Pagination doesnt show numbers

Edit: full code: <?php get_header(); ?> <main role="main"> <!-- section --> <!-- Home Design Inner Pages --> <div class="ulockd-inner-home" <?php if ( ...
0
votes
0answers
25 views

Multisite Posts Ajax Pagination?

I am using Multisite and have the below code which pulls in posts from 2 sites. How can I add Ajax "Load More" pagination to the below code? Ideally when a "Load more" button is clicked it displays ...
0
votes
0answers
31 views

Yoast's rel=“next” & rel=“prev” tag don't work on static homepage's paginated pages

Yoast support says "Our plugin utilizes the built-in WordPress core functions to recognize pagination. Some plugins and theme developers have modified or created their method of adding ...
0
votes
0answers
23 views

Custom Post Type Pagination getting 404 error

function viewevnts() { ob_start(); $query = ( get_query_var( 'query' ) ) ? get_query_var( 'query' ) : 1; $args = array( 'post_type' => 'events', 'category_name' => 'en-events'...
0
votes
0answers
17 views

Pagination on custom post type without plugin

What's the best way to display pagination on a custom post type archive page without a plugin? I tried paginate_links() didn't work. I'm using a custom query and here's the code: $args = [ '...
0
votes
1answer
28 views

Why my pagination gets 404?

I'm trying to understand why my pagination gets 404 error on each page starts from second. Right now in Reading settings I've set Blog pages show at most to 1. <?php $paged = (get_query_var('...
0
votes
0answers
10 views

Adding query argument after slash in URL

I am trying to add a parameter at the end of my custom post type page to do some pagination. I've added the following to the functions.php but wordpress still throws me to 404 page add_action('init', ...
0
votes
1answer
14 views

Can't Add Pagination

I can't add a pagination to divide my posts between pages and navigate between pages. Currently all 20 posts I have loads at once. I want to add a pagination to the bottom of my Page and view posts ...
0
votes
0answers
17 views

Two Pagination in One page with shortcode

I create a shortcode to show posts by category with attributes. I want to show 2 separate categories with a separate shortcode in one page but the pagination connected. If I change pagination in the ...
0
votes
1answer
26 views

Post Pagination Showing Same Posts Every Page at wordpress blog

at WordPress blog Post Pagination Showing Same Posts Every Page My loop <?php $args = array( 'numberposts' => 12, 'order'=> 'DESC', 'orderby' => 'date' ); $postslist = get_posts( $args );...
0
votes
0answers
11 views

How do i change pagination permalink structure?

Current permalink structure is like: /page/2/, /page/3/ And i want to make it like: /?_page=2, /?_page=3
0
votes
0answers
22 views

Change default pagination URL style

My default pagination style on category pages is /page/2/ but I require it to be /?_page=2/ Can I accomplish this with a rewrite? Cheers Janine
0
votes
0answers
143 views

How to reverse the pagination numbers of an archive?

I have archive pages that each contain titles and excerpts from 10 blog entries. Both entries and archive pages are in reverse chronological order: when a new blog entry is written its title and ...
1
vote
1answer
91 views

Unwanted Duplicate Posts Showing in Pagination Pages

For some reason, I have posts that keep repeating on certain pagination pages using the code below. It's completely random, so I have no idea how to fix the problem. Maybe it's something in the post ...
0
votes
0answers
21 views

Remove WP Core canonical for category pagination

It seems that WP is adding a canonical to the root of my pagination, and no indexing all other pages on Category pages. For example, /locations/residential/?_page=2 is no-index, and gives /locations/...
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 ...
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 ) { ...
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
89 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 ...
0
votes
0answers
17 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
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
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 ...
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
34 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
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
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.
-1
votes
1answer
29 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/...
0
votes
1answer
47 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
0answers
85 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
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
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
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 ...
0
votes
0answers
17 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
59 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
0answers
18 views

Get next and previous posts links

I have a custom taxonomy, custom post add_action( 'init', 'cptui_register_my_cpts' ); function cptui_register_my_cpts() { $labels = array( "name" => __( 'Events', '' ), "singular_name" =&...
0
votes
1answer
45 views

the_posts_pagination() function returns missing page numbering on some blog pages

I have a very strange issue that I am struggling to debug without amending the core function. On page 1 of the blog archive it shows page numbers: 1, 2, 4 (page 3 is missing). On page 2 and 3 the ...
1
vote
1answer
12 views

How to paginate information obtained from a query to a custom table?

I am building a small application which consults a registration group of a bd in wordpress, the code is as follows. function opt_menu_cactaceas() { global $wpdb; $tabla_aspirantes = $wpdb->...
0
votes
0answers
15 views

How to add category pagination under single post?

I don't want to split the post, my purpose to add the category pagination under each post is simply click on 1,2,3,4,5.... pagination and go to the exact page of the same category. Let me explain ...
0
votes
0answers
23 views

How to run WooCommerce pagination from within functions.php

I am building a very elaborate pagination script, the only piece I am missing is having the ability to run the in-built pagination from within the functions.php file. While within the functions.php ...
0
votes
0answers
15 views

Pagination Not Working With Custom Post Type Category

I can't get pagination to work with this custom post type category archive. The custom post type is called 'blog'. <h2 class="category-h2">Blogs Category: <?php single_cat_title(); ?></...
0
votes
0answers
9 views

How to redirect /blog/page/2 to blog/page2 in wordpress blog page

In the blog page i want to redirect the url /blog/page/2 to blog/page=2 or blog/page2 in wordpress.
0
votes
0answers
16 views

Custom post types on page with filter and pagination

How to apply pagination to the filtered results when filter adds the string '?filtr=1' after the domain name ? The filter works the following way... On my website (http://arche.cypis.net.pl/) after ...
0
votes
0answers
28 views

Why next_posts(); function does not work inside header.php?

Why does next_posts(); function does not work inside header.php whereas it ^does work^ inside temlate-homepage.php ? My code below: <?php // Query ALL posts ordered by random $args = array( '...
0
votes
0answers
24 views

Pagination unique to a widget

I am having troubles with pagination. It's widget. Every widget does have unique id . Say i have two widgets with pagination. If I cick page 2 of widget 2 then it will work but it will change the ...
0
votes
1answer
25 views

category/category_name pagination 404 error

<div class="row"> <?php $currCat = get_category(get_query_var('cat')); $cat_name = $currCat->name; $cat_id = get_cat_ID( $cat_name ); $paged = (get_query_var('paged')) ...

1
2 3 4 5
34