Questions tagged [paginate-links]

The tag has no usage guidance.

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

On click some element i want to use some template

I have a page that calls the template, I made filters using a data-filter.These filters sort out the ALU door and PVC doors. However when I click on the pagination and goes to page 2 to list the other ...
user avatar
0 votes
0 answers
7 views

How to Edit Ecommerce filters URL, h1, h2 , Title

I'm working in a Real Estate Website with filters for location, price. I'm trying to edit URL permalinks, H1, H2 to make more SEO Friendly. For example I would like to change https://www....
user avatar
0 votes
0 answers
21 views

Pagination not working on custom post types with rewrite slug

I've been trying to fix my pagination to work on custom post type slugs for example article/post-title/page/2 it just keeps showing the first page's results, the URL is changing but the posts remain ...
user avatar
  • 1
0 votes
0 answers
12 views

How to Show Next-Previous Link Only

I can not figure out how to keep Next and Previous links only and remove page number links. I also tried using this: previous_post_link(); next_post_link(); But it's not working. While using the ...
user avatar
0 votes
0 answers
71 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(...
user avatar
0 votes
1 answer
50 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->...
user avatar
1 vote
0 answers
29 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', '...
user avatar
  • 11
0 votes
1 answer
39 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 ...
user avatar
0 votes
1 answer
108 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 ...
user avatar
1 vote
1 answer
220 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 + $...
user avatar
  • 13
0 votes
0 answers
32 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 ...
user avatar
0 votes
2 answers
113 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... ...
user avatar
2 votes
1 answer
195 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 ...
user avatar
  • 23
0 votes
1 answer
551 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 ...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
  • 21
0 votes
1 answer
262 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 ...
user avatar
0 votes
1 answer
337 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 ...
user avatar
  • 3
0 votes
1 answer
64 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 ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
  • 848
0 votes
1 answer
237 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
327 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 ...
user avatar
0 votes
1 answer
53 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
1k 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 ...
user avatar
  • 65
0 votes
1 answer
499 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 ...
user avatar
  • 3
0 votes
1 answer
90 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 ...
user avatar
  • 193
0 votes
1 answer
245 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. ...
user avatar
0 votes
2 answers
179 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 ...
user avatar
  • 101
0 votes
1 answer
790 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 ...
user avatar
  • 11
0 votes
1 answer
292 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 ...
user avatar
  • 11
1 vote
1 answer
149 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 ...
user avatar
0 votes
1 answer
295 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 ...
user avatar
1 vote
1 answer
60 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 ...
user avatar
  • 111
1 vote
0 answers
78 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 ...
user avatar
0 votes
1 answer
206 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. ...
user avatar
7 votes
2 answers
3k 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 ...
user avatar
  • 175
0 votes
0 answers
116 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')) ? ...
user avatar
  • 101
0 votes
0 answers
203 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-&...
user avatar
  • 69
0 votes
2 answers
614 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, ...
user avatar
  • 1,113
0 votes
1 answer
481 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 ...
user avatar
0 votes
2 answers
1k 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' ) ) : ...
user avatar
  • 125
1 vote
2 answers
2k 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. <...
user avatar
  • 291
0 votes
1 answer
96 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 ...
user avatar
  • 259
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 ...
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 ...
user avatar
  • 259
1 vote
1 answer
857 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 ...
user avatar
0 votes
0 answers
711 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' ), ...
user avatar
  • 485
-1 votes
1 answer
112 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 ...
user avatar
1 vote
0 answers
652 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 ...
user avatar
  • 1,420
0 votes
1 answer
1k 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 ...
user avatar
  • 179
0 votes
0 answers
264 views

Paginate nested query of child posts

I need help with paginating the child posts created by Toolset on the page of the parent post. Basically, I need to recreate the functionality of this page http://dailytrendsetter.com/sports/top-10-...
user avatar