Questions tagged [paginate-links]
The paginate-links tag has no usage guidance.
124
questions
0
votes
1
answer
14
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 ...
0
votes
0
answers
157
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 ...
0
votes
0
answers
23
views
WordPress is adding pagination for all pages like www.example.com/page/123. How to remove that?
I think WordPress is adding pagination for all pages like www.example.com/page/1234.
In my case, it is adding for all pages not only for the blog page.
How to remove the pagination for pages in ...
0
votes
0
answers
131
views
Two pagination in one page without AJAX
So in this scenario, I'm trying to have a two pagination in one page, I have succedded doing that, in this specific page, I'm trying to display my custom post type and post at the same time in ...
0
votes
0
answers
51
views
Wrong rewrite rules
I have rewrite rules like this
'forum/(.+?)/?$' => 'forum=$matches[1]',
'forum' => 'pagename=forum',
website.com/forum -> correct
website.com/forum/page/2 -> 404 because it detect ...
0
votes
0
answers
60
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 ...
0
votes
0
answers
126
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(...
0
votes
1
answer
65
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->...
1
vote
0
answers
73
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',
'...
0
votes
1
answer
231
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 ...
0
votes
1
answer
275
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 ...
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 + $...
0
votes
0
answers
68
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 ...
0
votes
2
answers
289
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...
...
2
votes
1
answer
406
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 ...
0
votes
1
answer
821
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 ...
2
votes
2
answers
2k
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 ...
0
votes
1
answer
399
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 ...
0
votes
1
answer
785
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 ...
0
votes
1
answer
165
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
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 ...
0
votes
1
answer
366
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?
0
votes
3
answers
473
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 ...
0
votes
1
answer
63
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;
$...
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 ...
0
votes
1
answer
677
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 ...
0
votes
1
answer
117
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 ...
0
votes
1
answer
323
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.
...
0
votes
2
answers
230
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 ...
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 ...
0
votes
1
answer
342
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 ...
1
vote
1
answer
196
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 ...
0
votes
1
answer
421
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 ...
1
vote
1
answer
61
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 ...
1
vote
0
answers
154
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 ...
0
votes
1
answer
316
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. ...
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 ...
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')) ? ...
0
votes
0
answers
225
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-&...
0
votes
2
answers
665
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, ...
0
votes
1
answer
529
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 ...
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' ) ) : ...
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.
<...
0
votes
1
answer
97
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 ...
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 ...
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 ...
1
vote
1
answer
937
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 ...
0
votes
0
answers
775
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' ),
...
-1
votes
1
answer
116
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 ...
1
vote
0
answers
734
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 ...