Skip to main content

Questions tagged [paginate-links]

The tag has no usage guidance.

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

Multiple WP_Query with pagination shows Page/2 content on the remaining pages

I have gone through many articles and scrolled through almost all the questions here but couldn't resolve my issue. So I'll explain my scenario in detail My index.php looks like this which segregates ...
user3362364's user avatar
0 votes
0 answers
38 views

Woocommerce paginate link generates #038 instead of ? - seems connected to caching

If I don't reset my cache before using the shop page, #038 appears in the URLs generated in the pagination links at the bottom of the page, and the pagination doesn't work (stays on the same first ...
Resh's user avatar
  • 1
0 votes
0 answers
20 views

Pagination Links for Custom post type returns 404 [duplicate]

first of all, I am new to WP development, and PHP. I am developing a template that has several custom post types. the problem is when I add pagination to my custom post type, all pagination links ...
Ehsan Aliverdi's user avatar
0 votes
1 answer
21 views

Paginate_Links page 2 doesn't work

I have a custom query that can a list that can be up to around 20 items, so it needs pagination. It is displaying the correct amount of pages for how many items, but when clicking it it refreshes and ...
Erinn Szarek's user avatar
0 votes
0 answers
198 views

Pagination only showed when no category is set in wp_query

tldr: On my production site only, when I set category_name to any category my pagination does not show up. Once I remove category_name from my wp_query the pagination shows up (for all posts on my ...
james's user avatar
  • 135
0 votes
0 answers
111 views

Pagination links not working for custom taxonomy

I have a Custom Post Type (project) and a Custom Taxonomy (project_category). I have created a Page (Projects), which uses a custom template, in which I run a WP_Query to fetch projects and display ...
superfive33's user avatar
0 votes
0 answers
148 views

Help to modify wp_link_pages()

My site has the Newspaper theme by tagDiv, which installs two necessary plugins to make things work better. These plugins are Composer and Standard Pack. I'm trying to modify the default wp_link_pages(...
Emmanuel Lima's user avatar
0 votes
1 answer
70 views

Archive page for Wordpress Custom Post Type doesn't show pagination from paginate_links()

I have a custom post type with courses-events as the slug. In functions.php, I have: add_action( 'pre_get_posts', 'custom_archive_items' ); function custom_archive_items( $query ) { if ($query->...
arrr_matey's user avatar
1 vote
0 answers
104 views

Last page in pagination does not match max_num_pages - the overall post count is less according to pagination

I'm using paginate_links() to display my posts pagination like this: $paged = get_query_var('paged'); $current_page = max(1, $paged); $custom_query = array( 'post_status' => 'publish', '...
Julian's user avatar
  • 11
0 votes
1 answer
405 views

search with pagination not working as expected

Why is this url pattern taking me to a 404 page where i saw in some other sites this same pattern works fine with search and paginate please help me i am new to wordpress and don't know why this is ...
Amir Rahman's user avatar
0 votes
1 answer
325 views

Pagination contents not changing in Front page WordPress

This question has asked many time before and none has answers my question. I went through most of the answers before post this. I have a pagination query in home page. Pagination is showing and I can ...
user2584538's user avatar
1 vote
1 answer
1k views

Add css class to Pagination?

I've been using this code: $current_page = get_query_var('paged'); $current_page = max( 1, $current_page ); $per_page = 12; $offset_start = 1; $offset = ( $current_page - 1 ) * $per_page + $...
Rebecca's user avatar
  • 13
0 votes
0 answers
77 views

How to add pagination in Terms

Hello on my website I have created a page where it will show all of the Woo Commerce tags in the store in list format. The problem here is that I am unable to paginate them. I have tried ...
Ashish Jat's user avatar
0 votes
2 answers
373 views

Pagination not working - FrontPage

I'm trying to add pagination through function.php. No Output! What I'm missing? function simpleblog() { $query = 'posts_per_page=6'; $queryObject = new WP_Query($query); // The Loop... ...
Chinmay Rajyaguru's user avatar
2 votes
1 answer
529 views

Paginate_links won't create the right links on a taxonomy filtered custom post type archive

after hours and dozen of tests and messes... i'm face to the wall and fed up searching (mainly cuz my google's answers are already all clicked !) I'm trying to display paginate_link with a filters ...
nico's user avatar
  • 25
0 votes
1 answer
892 views

How to properly rewrite pagination rules for a CPT to avoid 404 error on /page/2

I have custom post type called News and a static page that uses a custom template (page-news.php) and indexes all the news posts under homepage.com/news url. The problem is that I want to paginate the ...
Em Karimifar's user avatar
2 votes
2 answers
3k views

In pagination, change link for page 1 to homepage

I have a problem, when I am on page 2 or on any other page and I want to return to the index, the url that offers me the pagination on page 1 is the following (https://www.url.com/page/1) and I would ...
Luis's user avatar
  • 21
0 votes
1 answer
446 views

Include a leading zero in pagination

I'm new to WordPress Development and have been teaching myself over the last few months how to develop a theme from scratch. Normally I can figure issues out on my own through forums, but I can't ...
Auromnia's user avatar
0 votes
1 answer
995 views

Show number of pagination pages even when total under two

I have implemented pagination to my wp site and pagination works correctly, but when I limit to display lets say 10 posts and I have 9 then it won't show pagination. Is it possible to show in that ...
Kertix's user avatar
  • 3
0 votes
1 answer
177 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 ...
Izel Maras's user avatar
0 votes
1 answer
3k 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 ...
pjk_ok's user avatar
  • 908
0 votes
1 answer
394 views

WordPress Pagination with ajax - Dots

I am using paginate_links() along with pagination. It works whenever a number is clicked but if I click 3 dots stays there so no 4 pages can't be selected. Is there any workaround?
user avatar
0 votes
3 answers
553 views

Combining WordPress pagination functions for archives and search results

I am currently modernising an old WordPress theme (a standalone theme, not a child of any official themes). Trying to build pagination I am finding some issues creating one function that works for ...
MultiformeIngegno's user avatar
0 votes
1 answer
83 views

Pagination not working for archive

The query works for the default blog and pages but not for custom post archives. Did I miss something? $paged_bottom = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1; $...
user avatar
2 votes
1 answer
2k views

Can paginate_links() be customized for a specific category or tag?

I am creating category and tag page templates for my client so they can post news articles to the news category page and specific news pages separated by tag with a pagination nav at the bottom of ...
Fizzler's user avatar
  • 75
0 votes
1 answer
701 views

paginate_links method doesn't show second page of my custom wp_query

I'm trying to create a custom search page using wp_query. I'm using post method to get search values. At first, the search was doing fine, but when i got a search results of more than 4 posts (i set 4 ...
Perl's user avatar
  • 3
0 votes
1 answer
123 views

Sidebar pagination posts not shown when sidebar is in single.php

A quick question. So I have created a loop in a new file called sidebar-extra.php which I include via the header.php into my single.php file. Problem: when I go to a post (single.php), I can't see ...
Siyah's user avatar
  • 193
0 votes
1 answer
359 views

How to focus to a specific div when page reloads by pagination?

I´d like to focus on a div (#main.first), after clicking in wordpress pagination in my homepage. I need that because my header (with image slider) is too big, and it steals focus from my posts list. ...
Omniatom's user avatar
0 votes
2 answers
250 views

Broken pagination links on WP 4.9.10 blog pages

We noticed a weird issue on our WP 4.9.10 blog pages when going to 1st page. Right now we can go to 2nd or 3rd page by clicking the page numbers but saw that it gives 301 code when going to 1st page ...
cnu's user avatar
  • 101
0 votes
1 answer
1k views

Why does paginate_links() reload the entire page? and can you make it reload only a specific div?

Beginner here; apologise for any obvious mistakes. I have a post list on my homepage showing 3 posts at a time and using paginate_links(). When I click on page2 or next in the paginate_links(), it ...
N3mo's user avatar
  • 11
0 votes
1 answer
367 views

How to use multiple paginate_links() in my index.php?

I've created two divs which displays posts from two different categories. The paginate_links() function works only for the first div and not for the second. I tried @Boone Gorges answer: Multiple ...
N3mo's user avatar
  • 11
1 vote
1 answer
208 views

How to get URL for the first page of post archive

I would like to get the first page of an archive. I have an archive with events. /events display events, which are not finished yet. /events?past display past events. I use get/remove_query_arg to ...
Saren Tasciyan's user avatar
0 votes
1 answer
464 views

How to add post page pagination to template part?

How can I get this page to display the post page pagination? I'm using a custom blog template with a get_template_part. https://www.nowitconnects.com/blog/ <?php /** * Template part for ...
angeladesign's user avatar
1 vote
1 answer
64 views

Why category.php throw 404 in wordpress while calling paginate_links()?

I am trying to develop my own Wordpress theme and want to add pagination in category page by call paginate_links() function. It will generate the links [1,2,... Next] perfectly but when I click on 2 ...
Atul Rai's user avatar
  • 111
1 vote
0 answers
175 views

How do you paginate a query grouped by month?

I am currently using David Gard's solution from the thread below. It works great as it fills the requirements of the OP. Basically grouping the custom posts by month and cap it at 6 months. Display ...
Simple Theory's user avatar
0 votes
1 answer
352 views

Highlight the first page pagination_links

i need help in WordPress. I'm not a WordPress developer, but for some reason i have to change some code in here. Now coming to the point. I have a page where i'm showing some content with pagination. ...
Alauddin Ahmed's user avatar
7 votes
2 answers
4k views

Paginate Link generate additional #038; whenever my Url have multiple Query String

My generated paginate link results will have additional #038; in the url, may I know how to get rid of it? Blog page url : http://localhost/wordpress/blog/ I had already setup pagination with ...
Mavichow's user avatar
  • 189
0 votes
0 answers
136 views

404 page not found on pagination in home page while navigating to next page

I am new to wordpress. I am trying to paginate custom post type I have created on index page. I can't figure out what I'm doing wrong . Here's the code : $paged = (get_query_var('paged')) ? ...
Niby's user avatar
  • 101
0 votes
0 answers
237 views

The pagination is working on Local, not on LIVE. why?

Here is the code for pagination: function numeric_posts_nav() { if( is_singular() ) return; global $wp_query; /** Stop execution if there's only 1 page */ if( $wp_query-&...
Noobie's user avatar
  • 99
0 votes
2 answers
699 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, ...
Josh Rodgers's user avatar
  • 1,173
0 votes
1 answer
566 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 ...
amin foroutan's user avatar
0 votes
2 answers
2k views

Pagination Links showing incorrect previous page number

Cant seem to return to the index page with the Previous link using paginate_links(). Previous link is linking to paged 2. $paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : ...
Sylar's user avatar
  • 125
1 vote
2 answers
3k 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. <...
HOY's user avatar
  • 291
0 votes
1 answer
99 views

Using Pagination for Custom Post Type and keeps returning 404

I'm able to return the correct page numbers (1 post per page) but the paginated links keep returning a 404 page. Here's the function I'm calling for the pagination: //Pagination for Custom Taxonomy ...
bhood's user avatar
  • 257
3 votes
3 answers
3k views

Custom Search Page Pagination Not Working

My Seach Page URLs: https://www.example.com/search/keyword/page/2/ Here my custom search page: <?php if($_GET['search_text'] && !empty($_GET['search_text'])) { $text ...
HOY's user avatar
  • 291
0 votes
1 answer
1k views

Pagination using paginate_links

I am using the built in paginate_links function and setting formatparameter to the default value: '?paged=%#%' . For some reason, it keeps redirecting to a different formatted url. For example, when I ...
bhood's user avatar
  • 257
1 vote
1 answer
981 views

Customizing comments pagination for bootstrap

I want to customize the comments pagination to support Bootstrap, I have these lines in my theme file but I need more customization to display Bootstrap pagination style <?php ...
Farhad Sakhaei's user avatar
0 votes
0 answers
784 views

Post navigation doesn't show (in custom template, custom post type, custom query)

In a custom template, <?php /** * Template Name: News */ ?> I do this query: $args = array( 'post_type' => array( 'news' ), 'post_status' => array( 'publish' ), ...
aitor's user avatar
  • 605
-1 votes
1 answer
118 views

error with $query->have_posts()

i am new to wordpress, here, what i am doing is fetching the thumbnails of post type= organisation,please check if there is a problem with my $args array and i apply the pagination here, but wp-query ...
Jay Kapoor's user avatar
1 vote
0 answers
799 views

Duplicate posts in paginated results

I'm running into an issue where there are duplicate posts appearing in my paginated results. I suspect the issue is to do with my use of paginate_links(), but if anyone can see something obvious in my ...
Osu's user avatar
  • 1,442