Questions tagged [pagination]

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

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

WordPress Pagination Urls + Japanese Keyword Hack

My site has been hacked about 2 years ago. I got rid of that Japanese Keyword Hack and the site is clean. However, Google tries to crawl old pages with these random characters, and more specifically ...
0
votes
0answers
10 views

Pagination on taxonomy template not working after rewriting slugs

My pagination is not working on my taxonomy(sub-category) page. It keeps on loading my archive template. This happened after I applied function codes that re-write's url and producing all parent and ...
0
votes
1answer
16 views

pre_get_posts pagination not working

I've been trying to fix my pagination on for category pages but am at a loss. This is my pre_get_posts function for category pages. add_action( 'pre_get_posts', function ( $q ) { if ( !is_admin() /...
0
votes
0answers
8 views

Rewrite rules showing blog pagination 404 error

I added below script in my website to setup custom language slug like th, se etc. After adding this below script my pages are working like. www.mywebsite.com/ www.mywebsite.com/se/ www.mywebsite.com/...
0
votes
0answers
19 views

How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?

The Setup I have divided my blog into 3 categories with their respective slugs. There are 3 pages corresponding to these 3 categories with their respective custom page templates. On each page, I ...
2
votes
1answer
21 views

Redirect “any page/page/number/” to “any page”

I've read so many similar topics but none of them matches my own request. I'd like to redirect in ht.access any page with pagination to the root-main-original page. example.com/garden/page/2 ...
0
votes
1answer
20 views

custom posts archive pagination links /page/2/ ends up in 404

I have a custom post named blog, I am using a page with url - slug blog, with custom template for displaying the blog arhive. This is the query I am using in the template file: global $wp_query; ...
3
votes
2answers
33 views

How to get post pagination like this

I'm using this function right now wp_link_pages( array('before' => '<div class="page-links">','after' => '</div>',) ); The post pagination is showing like this: 1 2 3 4 ...
1
vote
0answers
24 views

Limit the number of acf content when displaying in post loop [closed]

I display post images by this way in the loop . <?php $images = get_field('POST-IMAGES'); $size = 'medium'; // (thumbnail, medium, large, full or custom size) if( $images ): ?> <ul> ...
0
votes
0answers
23 views

AJAX Load More Posts not working in my custom WordPress theme. Help!

I have been working on my custom theme since last week. I am trying to code kind of an eCommerce solution. Well, I registered custom-post-type called 'product' and was coding archive-product.php. I ...
0
votes
0answers
12 views

How to make AJAX Load More Posts on Scroll for custom theme and custom-post-type?

I am currently working on a project where I am coding a custom theme with custom-post-type called products. Now, I am coding archive-product.php and stuck at making an AJAX load more posts on scroll ...
1
vote
0answers
17 views

How do I move/order posts with a tag to the end?

Let's talk about the situation first. I have a query for finalists, some of which has a tag 'Special Mention'. I need to move all posts with the tag to the end of loop. e.g. I have 13 posts, 3 of ...
1
vote
0answers
141 views

Pagination Broken on Static Pages but Works on Blog Articles

Our live site has a staging site. All plugins have been updated to the most recent version on the live site. The plugins have not been updated on the staging site. The website does not have a plugin ...
0
votes
1answer
17 views

Whole site's pagination not working after rewriting product permalink

I have to rewrite the product's permalink by changing it from the default /product/product-name into /%product-cat%/product-name. %product-cat% is a custom category. But after I rewrite it, the ...
1
vote
0answers
25 views

pagination with 'no_found_rows' => true,

I have 100000 records in my database and so many meta query performed on it so it takes lot of time to perform the operation, have checked few articles and using them it suggest disable no_rows_found ...
0
votes
1answer
18 views

Wordpress pagination URL

How to get a similar kind of pagination URL in Wordpress? In both the URL you can see 'Faculty' which you cannot achieve in default Wordpress I guess. Listing page: https://engineering.jhu.edu/...
0
votes
1answer
13 views

Pagination not working in custom post type. Help

I am currently working on an eCommerce project where I am coding a non-WooCommerce dependent theme for eCommerce. The current problem with me is, I am coding archive-product.php which is a custom post ...
1
vote
0answers
23 views

Change search results order for Admin -> Appearance -> Menus -> Pages -> View all

I have over 200+ pages (about 100 for each of my two languages). How I can change the order of results? I need the same as on the page with Page list. On the Page list e.g. you have a parent page and ...
0
votes
1answer
24 views

Add pagination to WP_Query

I have tried to add pagination in the below code but dont know how to integrate with it. Kindly help to get the paginations on the posts. <?php $child_query = new WP_Query(...
1
vote
1answer
13 views

404 on paginated blog pages

We are running WP 5.6 and Beaver Builder 2.4.1.3(Pro). It is a multisite installation and we are having issues on the main site. Our home page for the blog loads just fine: https://www.awana.org/blog ...
0
votes
0answers
24 views

Post pagination in WordPress redirects to first page

I have a website with posts having a lot of images. I made a sort of pagination. Example: http://example.com/article-name/ gives you the first image http://example.com/article-name/2/ gives you a ...
1
vote
1answer
22 views

next_posts_link URL does not include name of custom post type

Inside my index.php, I have a new WP_Query() for a custom post type that I have named "todo". I am trying to implement pagination for this query, so it only displays three posts, then ...
1
vote
0answers
20 views

I want to remove numbers from the_posts_pagination function

I am not good in editing theme codes especially with wordpress but I tried to on my own to edit the pagination in my theme archive.php which include numbers (1,2...10) and next/prev links. <?php ...
0
votes
0answers
14 views

Custom Posts are not displaying correctly

I created three custom post types which are our-work, resource and news-and-events. In Our Work, I can click page two from the pagination section to view more custom posts. But in resource the page ...
0
votes
0answers
7 views

Method for calculating the offset in order to use array_splice on wpQuery->posts

function getOffset($index, $length, $offset) { $result = 0; $transfer = 0; if ($index + 1 > $length) { return -1; } if ($index + 1 + $offset > $length) { $transfer = $index + 1 ...
1
vote
0answers
14 views

Changed pagination URLS to use p= instead of paged=

I am trying to rewrite my pagination URLs to use p instead of paged so they go from... example.com/myposts?paged=2 to example.com/myposts?p=2 How is the best way to do this? Do I need to use the ...
1
vote
1answer
29 views

Why is page/2/ not working?

This is my search page code can anyone help me figure out what is the problem I m having no content in my page 2 ...
0
votes
0answers
13 views

wp_query Pagination is not displaying

I have a basic wp_query that I am trying to apply pagination to like this... $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $args = array( 'post_type' => '...
1
vote
1answer
40 views

Set noindex page-comment from Pages 2, 3 and More?

I use All in one seo pack plugin. I see that Google indexed page comments (that are a pages generated from paginated comments). The example url are the followings: URL canonical - mydomain.com/url-...
0
votes
0answers
19 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
31 views

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

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
11 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
32 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
23 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
38 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
10 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
23 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
168 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
16 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
25 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
27 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
11 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', '...

1
2 3 4 5
35