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

learn more… | top users | synonyms (1)

1
vote
1answer
886 views

Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it

I'm trying to output a custom post type archive using a shortcode. Everything works fine except for the get_next_posts_link part. The weird part is that it's right next to a get_previous_posts_link ...
0
votes
1answer
33 views

Need help on wordpress pagination script

Could you please check what is wrong in pagination script. Actually I have set 4 post limit and there around 8 posts in my blog. When click on 2 pagination, it won't move to next page. Please check ...
0
votes
1answer
25 views

Creating a custom category page with pagination

The past week I've been trying to figure it out on creating a custom category page with pagination. I've tried in so many ways but I cant get the pagination right. If anyone of you can help. What I ...
1
vote
5answers
583 views

Pagination for blog posts reloading same page

Symptoms Visiting /blog/ loads the first 10 posts, as expected. Visiting /blog/page/2/ (and onward) loads the new URL but with the same 10 posts. Nothing changes but the URL. Setup Details Custom ...
0
votes
0answers
11 views

How can I paginate search results from search in custom plugin and tables?

I've been trying to get this done for hours now and it's just not working. I have a custom plugin that has a search box on the front-end that one can use to search for data from my custom tables. ...
0
votes
1answer
52 views

Update Gallery Randomly in every hour with no duplicates?

I need to order by rand with no duplicates and update my galley in every hour on WordPress. Check the code bellow. This is what I want, ( PHP , MySQLi ): <?php include ...
0
votes
3answers
5k views

Changing pagination list class

paginate_links() function returns unordered list with class named "page-numbers". How can I change this class? EDIT Currently, I am using the band-aid method below. $return = paginate_links( $arg ...
0
votes
0answers
14 views

Pagination not working for custom category template and custom permalinks

I am using following code in category-20.php, for the pagination through ajax, which is working fine for the defaults permalinks. But when i change the permalinks to custom, then pagination doesn't ...
1
vote
3answers
698 views

Pagination: /tags/tag_name/?paged=2 gives a 404 error

I need to paginate an archive page. Pagination works perfectly fine for everything except tag/category archives. Basically if I use /tags/tag_name/?paged=2 it gives me a 404 error. But if I use ...
0
votes
0answers
8 views

“Pagination” for Posts with next/Prev navigation outside loop

I would like to list all posts from a category or all posts on one Page and add a navigation on the right side, so outside the loop which loads my posts. i found this post whick has a similar ...
0
votes
1answer
19 views

Display NEXT and PREVIOUS pagination? [duplicate]

I need help on the pagination. I try to put the NEXT and PREVIOUS pagination that show the post in a same category, but I am not sure what happen that showing nothing. If you can help, much thanks! ...
1
vote
1answer
872 views

404 - Category pagination for custom post type

--Edit I've managed to narrow it down that the paged variable is not working properly here, (get_query_var('paged')) ? get_query_var('paged') : 1; is always returning 0 although maybe it is due to ...
1
vote
2answers
1k views

Pagination doesn't work

I created myfile.php with the following content: global $paged; if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); } else if ( get_query_var( 'page' ) ) { $paged = ...
0
votes
1answer
768 views

List posts based on first letter of posts

I want add a pagination How can I do this on both loop.php and search.php. I want show alphabetic index to search only posts with starting letter = [E] for example. Right now, if I search with E it ...
0
votes
0answers
16 views

Wordpress Pagination problem When using if condition inside the loop [duplicate]

i have problem with Wordpress Custom Loop Pagination when i use if condition inside the loop some of posts doesn't have if value disappear but the Pagination counting that hidden post and have empty ...
0
votes
0answers
38 views

What is wrong with my code ? pagination does not show up

Everything works fine other than the pagination. I have even tried with my own pagination method which works fine on Index page and Archive page but not in this template <?php /** * Template ...
1
vote
1answer
22 views

How to test pagination?

I've been building a theme from scratch so writing everything from nothing and every place I go online which teaches me how to implement pagination are mostly showing ways to make the standard ...
1
vote
1answer
174 views

Archive template for custom post type only lists first 10

Here is my template for archive-people.com: It currently only shows the first 10 people. I'd like it to show everyone, not just the first 10 people. <?php get_header(); ?> <div id="content" ...
0
votes
1answer
824 views

Pagination for multiple queries merging into one Loop

I have an events site where I want to display upcoming events that can be booked in ascending date order, and events that are closed for registration in descending order. I'm using get_posts for each ...
-1
votes
0answers
17 views

Pagination pot showing

I have the following code listed below, where I reset the post data after words, I have tried resting the query data and the pagination still doesn't show. I have even tried to set, in the Reading ...
0
votes
0answers
22 views

Pagination on page.php with wp_query and query_posts

I'm trying to get pagination to work on a custom page.php and this has been kicking my butt... here is my site Here is my code: <!-- Page Blog Body Start ...
0
votes
0answers
7 views

pagination not working on page template

I am having a custom page for displaying community posts, where i want to display the posts posted in last 30 days sorted in desc order by meta value of post views which has to be greater than ...
0
votes
1answer
453 views

foreach pagination

I am looking for help in how to paginate my foreach output. I've looked at other questions and answers and cannot find a solution that works for me or that I can figure out on my own. Right now my ...
0
votes
1answer
45 views

Get pagination working for custom loops within page templates

I've got a custom loop for which I'd like pagination. The codex and examples I've found online indicate that I should get pagination as long as I pass the 'paged' query variable into the loop as the ...
-1
votes
1answer
371 views

query_posts different amount of posts per page [duplicate]

I have a posts_per_page query to paginate multiple post types, which works great! Now though, as it paginates it to show (in this case) 100 posts per page, I'm wondering if you can show 100 on page ...
0
votes
1answer
408 views

/tag/tag_name/page/2 gives a 404 error

I created my own template for list of entries for certain tag (tag.php), It will shows up 10 entries, and with Previous & Next link. <?php $paged = get_query_var('paged') ? ...
2
votes
1answer
114 views

How to bring specific post to front of wordpress loop?

So, I have a WordPress loop going on. The below code is the template page for the woocommerce product archive page. Here's the use case for what I am trying to find out how to achieve: User is ...
0
votes
2answers
861 views

Post Pagination Modifications (wp_link_pages)

I'm looking to modify how Wordpress is showing the pages of my posts. What I currently have is a previous and next page link at the bottom of the post with the following code: <?php wp_link_pages( ...
-1
votes
0answers
42 views

Woocommerce custom taxonomy query pagination

I'm using this custom query on archive page for Woocoommerce taxonomy to list all products and it works: // Retrieving current page number $page = (get_query_var('paged')) ? ...
0
votes
1answer
14 views

Archive - Show Page Month Headers

Trying to output posts on an archive page with date titles. Ideally this can be a single query so I can paginate the archive. Currently I can call multiple queries for each date item but I don't think ...
4
votes
1answer
4k views

How to display pagination links for WP_User_Query?

I think I'm nearly there with this, but I can't get the pagination links to show for a directory of authors I'm creating. My code is below, but I don't know how to get the links to navigate between ...
0
votes
0answers
19 views

Get Pagination For List of Wordpress Categories

I'm trying to display a set number of categories on a custom page template. The Categories contains featured image and link to their children. I'm using "Categories Images" plugin to get Category ...
3
votes
4answers
8k views

How to add CSS Class to previous_post_link or get previous/next post link URL

How can I add a CSS Class to the previous_post_link output or just get the URL and create the HTML markup myself
0
votes
3answers
3k views

Pagination not working on home page

I've a page named "share" with a complex loop that's working perfectly. This page is located at domain.com/share. Now I need to use this page as the home page, so I went to "Settings -> Reading" and ...
0
votes
0answers
8 views

Change link for paginated page '1' to link to canonical page, not /page/1/

When deeper than the first page in paginated set of pages, the link to go back to the first page doesn't link to the canonical page, but the page/1 version of the URL. e.g ...
0
votes
2answers
769 views

Archive Page for Custom Post Type is not Working

I have registered a custom post type "tutorials" with the following snippet. <?php /* Template Name: Tutorial Archive */ get_header(); ?> <div id="content"> <div ...
0
votes
2answers
2k views

Pagination with get_posts seems to work but links not showing

I've a custom page template where I want to query 2 posts from a post type and 1 post from another post type. I have it set up like this: $paged = get_query_var('paged') ? get_query_var('paged') : 1; ...
0
votes
1answer
10 views

Custom page pagination based on Kriesi pagination

I am stuck on this problem: We have 2 custom post types on our website, both created the same way, only the name of the post type differs. In addition we have 2 custom page templates which show an ...
0
votes
2answers
385 views

Pagination/infinite scroll with WP_Query and multiple loops

I need that the main page of my site have 3 columns: - The first having the 5 most viewed posts; - The second with the next 5 most viewed posts; - The third with the most recent posts. I don't want ...
3
votes
3answers
7k views

Pagination with custom SQL query

I have my own SQL string to select Custom Post Type posts with specific WHERE clause. I've used the offset and limit to return appropriate posts depending on a page being displayed. That's working ...
0
votes
1answer
1k views

Custom post type archive page pagination

I have set up an archive page for my custom post type reference, where I use a query to get all posts of type reference. This works, but when I try to paginate the result, it doesn't work. Right now, ...
2
votes
2answers
617 views

Pagination problem after WP_Query with tag filtering

I have a problem with a custom WP_Query. I want a page with all posts with a specific tag. This is the code I'm using: <?php //save old query $temp = $wp_query; //clear $wp_query; $wp_query= ...
0
votes
0answers
13 views

/page/2/ not showing

I am having a weird issue where when clicking on the pagination links the page just refreshes. The links are pointing to the proper pages(/page/2/) but when clicked, they do not show in the url. This ...
0
votes
0answers
29 views

pagination in woocommerce order history page

Please help me to add pagination in my order history page. Pagination should work like WooCommerce products page. Here is my code: <?php $customer_orders = get_posts( apply_filters( ...
3
votes
1answer
2k views

How to paginate the get_users function?

Im using the get_users function to show a custom list of users on the site. The only issue Im having a problem figuring out now is how to paginate the result. This is a sample of the function that Im ...
2
votes
2answers
2k views

get_query_var('paged') always returns empty

Putting this up after having hit a brick wall for possible solutions. Have a site with quite a few custom post types and associated custom taxonomies. To help make things easy, I'm using a unified ...
0
votes
0answers
33 views

Assistance with complex query based on ACF Post Object Field

I got the following scenario: Two Custom Post Types: Game Bonus Two Custom Taxonomies (Not Hierarchical ): Game-Type (Poker, Roulette, BlackJack, etc') Bonus-Type (Free Credits, Free Spins, ...
1
vote
2answers
465 views

Pagination on Custom Post Type: 404 Error

I've been getting a 404 error on a CPT archive page, and am not sure why. I can go to the page set for the custom post type archive, but the next page /mycustomposttype/page/2 gets a 404 error. I ...
0
votes
0answers
33 views

Remove trailing slash

I need to revert from "pretty prmalinks" to query string just for the pagination urls. (so that example.com/page/2 becomes example.com/?paged=2). It could possibly be done via a hook in to redirect ...
2
votes
2answers
988 views

Placing Ads after every 10th Post with Infinite Scroll

I have to load a couple of ads, some normal html and two are java script. I've tried the PHP method of this: <?php $postnum++; if($postnum%10 == 0) { ?> <div id="topset"> <ul ...