Questions tagged [pagination]

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

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

Creating a Back button on detail post page to go back to blog page with same query strings and page id

So, I would like to have a back button on the single post page that can be dynamic to the point to where it knows where it is in the query and bring me back to the blog page on the right page number ...
0
votes
1answer
791 views

Apply filters when loading post via ajax

Have been trying to solve this for couple of hours already. Here's the case: I'm making a plugin that separates the posts into pages using the <!--nextpage--> tag. It works fine but I want to ...
1
vote
2answers
784 views

Start post pagination at 0 instead of 1

Is it possible to start post pagination count at zero instead of 1? I want the URLs to be like this: ../page (Foreword) ../page/1 (Chapter 1) ../page/2 (Chapter 2) But by default the URL ...
1
vote
1answer
527 views

WP Query with offset breaks wp_pagenavi or any pagination

I am working on a custom loop using WP_Query using the offset parameter. The problem is that as soon as I add the offset, it breaks the pagination, displaying the same links no matter the page number. ...
0
votes
0answers
31 views

pagination woocommerce i can´t do it

hello i trying to do pagination with php and woocommerce and wordpress this is my nav pagination <div class="nav-links"> <a class="next page-numbers" href='<?php //...
1
vote
1answer
691 views

404 when using pagination in a category

I always struggle with pagination in wordpress. I really wish that was a definitive guide to wordpress rewrite rules. I have a site setup this way: permalink custom structure: /%category%/%postname%...
0
votes
1answer
2k views

Pagination doesn't work on static front page

Static front page pagination working fine on localhost. but when i uploaded the to server online its not working. i am using infinite scroll. the issue is only with static front page, when i don't use ...
0
votes
2answers
873 views

Show a page counter for pagination

I currently have simple pagination set up showing the text older and newer. If one of the text isn't needed it display an 'inactive' version of it so that the text doesn't disappear. <?php if( ...
2
votes
1answer
663 views

Display post links under month in paginated archive

I'd like to create an archive that lists posts under a month header. The months would just be plain text and the post titles, obviously, would link to the posts themselves! So: October 2013 Post ...
0
votes
1answer
730 views

WordPress not showing pagination links

In my WordPress Index.html I am pulling out the 3 latest posts by using <?php query_posts('posts_per_page=3') ?> <?php while(have_posts()) : the_post(); ?> //rest of the post related ...
0
votes
1answer
38 views

Numbered Pagination Showing The Same Posts After Altering WP_Query

I think the title sums the problem up, but I'll explain more with the code below. As you can see, I'm trying to start the loop from the second latest post for some theme reasons which forced me to ...
0
votes
0answers
9 views

Custom Taxonomy pagination only working with get_previous_post OR get_next_post, but not both

I am using a custom post type with a custom taxonomy. I am trying to show prev/next pagination on the single, but I want it to limit it to CPT posts that are in the same custom taxonomy. Here's ...
0
votes
2answers
47 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
0answers
23 views

get_terms pagination

Anyone know how to paginate this get_terms function in wordpress, I tried some options but nothing worked, perhaps its because of the label? <div class="comp-modal-content"> </ul> <...
0
votes
1answer
644 views

How to group posts by months and add pagination?

I want to group by posts by months. Like this: January 2014 Post name Post name December 2013 Post name November 2013 Post name Post name Post name Post name I need to have 10 months per page, ...
0
votes
1answer
23 views

How do i make the_posts_pagination look like my template?

Firstly i tried making a custom pagination but i could not work out the .. part and removing the last numbers so i decided to use the default pagination of Wordpress. But currently i am stuck on what ...
0
votes
0answers
19 views

How to make a Dotted pagination in wordpress?

I am currently using this function for pagination. if( !function_exists('pagination')) { function pagination($pages = '', $range = 4) { $showitems = ($range * 2)+1; ...
5
votes
1answer
5k views

Pagination throws 404 error on custom taxonomy archive pages

I have created a custom taxonomy for a custom post type called "portfolio" like so: function jvs_portfolio_categories_init() { register_taxonomy( 'project-category', 'portfolio', ...
14
votes
3answers
29k views

Change Posts per page count

In the wordpress settings => Reading => Blog pages show at most [input field] posts I have it set to 3 posts at the moment. On my index, date archives, tag archives, category archives, search ...
1
vote
0answers
22 views

How do i improve my custom pagination?

So this is my current pagination Currently i am working with total of 6 pages so it shows 1 2 3 .. 5 6 (in the image below) 5 and 6 being the second last and last But when i reach the number 5 it ...
0
votes
2answers
1k views

Home page Pagination - Other pages do not redirect to home page template

I know similar questions have been asked, but none of them seem to answer the question. I've set up a post-loop widget that I put on the home page. It has pagination, but whenever going to any page ...
0
votes
1answer
36 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; $...
0
votes
1answer
30 views

How to add Ajax to this Pagination i made?

This is my functions file add_action( 'wp_ajax_homekong_pagination', 'homekong_pagination' ); add_action( 'wp_ajax_nopriv_homekong_pagination', 'homekong_pagination' ); function homekong_pagination($...
1
vote
1answer
43 views

Wordpress single page template, custom post type, pagination orderby title - alphabetical order

I've scoured for QUITE a while, am looking for method to paginate on a single page template, orderby title (client likes first name sorting of team members) I assume this would include a way to ...
16
votes
2answers
7k views

WP_Query Pagination on single-custom.php

What I am looking to do: Setup WP_Query pagination in a single-custom-post-type.php template file What I have done 1) Created a post type called "authors". Each post within that post type is an ...
0
votes
1answer
104 views

Limit Timber pagination number items

Transparency: Wordpress newbie here. 👋🏻 I am working on a Wordpress Timber/Twig project and I've added some pagination based on the documentation here: https://timber.github.io/docs/guides/...
1
vote
0answers
28 views

Comment pagination not working

I am trying to have pagination for comments with a widget. The comments are getting loaded properly but the pagination does not work. I have set the pagination in the WordPress set to 3 as well. ...
-2
votes
2answers
16k views

Pagination Using ajax

I want to use Pagination using ajax for custom post taxonomy. Many of codes are tried by me but at the last I was failed. So,how can i use pagination using ajax without plugin? When i am clicking on ...
0
votes
0answers
30 views

Rewrite paging in Wordpress

I am in trouble looking forward to help. I want to change "https://website.com/page/2" to "https://website.com?page=2" in Wordpress. Thank you so much!
1
vote
0answers
68 views

The default code for “posts_nav_link” on category.php isn't working

I am trying to make my own simple WP theme from scratch and I have run in to some difficulties. Maybe someone can help. I have a category named "News", whose slug is "news". The permalink structure ...
1
vote
2answers
1k views

Paginate Author's Post List on Custom Author Page (ANOTHER THEORY)

Here's another story for my Custom Pagination on Custom Author's Page. What I want to happen there is display the Author's avatar, description, website, and some additional fields, and of course list ...
0
votes
0answers
15 views

pagination on wordpress and not showing all results

I have this page that shows posts from a range of years selected of a form on a previous page. the first results display the 10 posts as set in args(post_by_page => 10); if there are more posts I ...
0
votes
1answer
4k views

Woocommerce products per page dropdown

I'm using the following code taken from here- http://designloud.com/how-to-add-products-per-page-dropdown-to-woocommerce/?showmodaldialog=1#comment-1554 to display a drop down selector so the user ...
1
vote
1answer
40 views

Add Pagination on Custom Post Type Archive

I've moved custom posts on what would normally be an archive template over to a dedicated page template. I've been following this article: https://jasonyingling.me/use-page-custom-post-type-archive-...
0
votes
1answer
396 views

Pagination and Related Posts

Is it possible to use pagination with the following related posts code, which is embedded in single.php of my theme. <?php // for use in the loop, list 5 post titles related to first tag ...
0
votes
0answers
12 views

Add pagination - syntax error when copy/pasting

I want to add pagination to this page: https://documentarynow.org/genre/documentary/ Can anyone explain why neither of these codes works? The theme developer added this code, which made the page ...
1
vote
1answer
138 views

wp_title() returns 'page not found' on page 2

I'm currently making a custom Wordpress template, and I'm using paginate_link to make page links at the bottom. index.php <?php get_header(); ?> <div class="container"> <div ...
13
votes
4answers
19k views

Change the “page” slug in pagination

Simple question. When pagination is activated, the URL changes to "site.com/page/2". For my site, this should be "site.com/paggetto/2". How can I change that rewrite rule? I also want to change "...
0
votes
1answer
395 views

Using pagination with multiple loops causes it to break

I'm have two loops on my index page. One fetches the latest posts from the 'work' category and the other fetches the latest from the 'blog' category. (see below) I am also using a plugin called WP-...
9
votes
7answers
19k views

Get current URL (permalink) without /page/{pagenum}/

How can I retrieve the current URL (whether homepage, archive, post type archive, category archive, etc) but always without the /page/{pagenum}/ part if it's present? So, if the real URL is: example....
5
votes
2answers
20k views

Pagination on a WP_query not showing navigation links

I'm having trouble adding pagination to a page. I'm using WP_query and would like to pull back 4 posts per page. The basic query seems to work OK but I must be missing something regarding pagination. ...
0
votes
1answer
403 views

WP_Query breaks pagination

I've been on this problem for a week now. I've searched through countless posts that just aren't answering the question. It seems that my wp_query breaks pagination. I've looked through a lot of the ...
3
votes
2answers
6k views

Show Previous/Next Posts navigation only inside the same category

Is it possible to force previous/next navigation to browse through the posts (back and forth) that are only inside the same category (and to exclude other categories)?
2
votes
1answer
45 views

wordpress Next/Previous post in same category not working

I use the following code to get the Next /Previous link in the same category In localhost, it worked good but in my Cpanel host doesn't good working Following code: First, get current id post and ...
0
votes
1answer
28 views

Wordpress posts loop pagination - first page return 125 posts instead of 10 and the rest return 10

I'm trying to show 10 posts per page with pagination on WordPress and the first page return 125 posts instead of 10 and the rest of the pages return 10 posts as requested, please assist :) $paged = (...
0
votes
1answer
15 views

What template file is used for homepage pagination?

This is most likely a duplicate and I'm just struggling for the right way to search it but what file is used to display actual pages of posts, not the post type of page but like /blog/page/2/ for the ...
0
votes
0answers
20 views

empty pages on pagination with meta query

I am using meta query to filter posts by various meta tags, showing 9 posts/page, but on pagination there are as many pages as were all the posts displayed without filtering, only that empty pages are ...
0
votes
1answer
150 views

Pagination issue with tag.php

I use this code in tag.php: global $wp_query; $paged = (get_query_var('paged')) ? get_query_var('page') : 1; $termsss = $wp_query->queried_object; $my_argsss = array ( '...
0
votes
1answer
54 views

Can I use paginate_links() to add a pagination list, yet prevent it from inserting links?

My page displays a list of WordPress users. For pagination, I have used the function paginate_links. This inserts a list onto my page e.g. page 2 page 3 page 4 (screenshot). And each list item is a ...
0
votes
0answers
44 views

Pagination inside the blog page not working

I have a widget which creates a grid with pagination. If I am using the pagination then it works fine when used on the page to display grid. But when I am using that in inside a blog post. The ...