0
votes
2answers
38 views

Archive page - problem with pagination

I have a problem to display pagination using WP_Query. I've created a custom page, code below: <?php /* Template name: Models */ ?> <?php get_header(); ?> <?php the_post();?> ...
1
vote
1answer
48 views

Unable to get paginate_links working with a custom query [duplicate]

I have built a news section in my Wordpress site with the advanced custom fields and custom post type ui plugins. On the custom news overview page (not the standard wordpress posts) I wanted to limit ...
1
vote
1answer
49 views

Search - Ajax - Alter Query Parameters with Pagination

Too Long ; Didn't Read How do I get pagination to work when I'm creating my query with ajax? I'm working on creating a functional search page that allows the user to filter how many posts per ...
0
votes
0answers
56 views

Pagination not working on template page

I have the following code, but it is not working. if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { $paged = ...
0
votes
1answer
28 views

Remove Post if Advanced Custom Field is checked to fix paging

I'm trying to setup a query that filters through posts and removes ones that have an ACF field "archived" checked. Post queries are pretty foreign to me. ...
0
votes
0answers
9 views

Pagination on custom post type with 2 wp_queries [duplicate]

Im trying to get my pagination on a page that lists all custom post types working. I have tried both the bones theme next/prev as well as the default wordpress option, to no avail. This is the two ...
0
votes
1answer
41 views

Second loop pagination changes URL, not content

I'm reasonably new to WordPress and I believe I am missing something conceptual here. I have assigned a static post to be my front page. My front-page.php template begins with a standard loop: ...
0
votes
0answers
33 views

How to add archives (with pagination) to page template?

So the site I'm building has a few different archives pages. For the newest one I'm building, I tried to copy the archive.php I've got: page-archives.php: <?php get_header(); ?> <section ...
0
votes
0answers
21 views

Trying to do a custom Search results page. Failing when I use the pagination

I'm trying to do a page where the user can search for posts with a Keyword (as search.php) and post date filter (between one date and another). I have a form with 3 fields: keyword, date1 and date2 ...
0
votes
0answers
45 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
1answer
57 views

Custom post type blog pagination conflict

I have a custom post type called 'emp_case-studies' and it has a page archive. Here is the code for archive-emp_case-studies.php: <?php $blog = $wp_query; $wp_query= null; $args= null; ...
0
votes
1answer
60 views

Wordpress Numeric Pagination with Query String [duplicate]

So I have a dynamic loop which is affected by a query sting in the URL.. For example I have 3 categories and when they click the category it just adds a query to the URL: <a ...
1
vote
1answer
44 views

No content found on page 2 of pagination with 1 post per page

This loop (used on a taxonomy-term archive page) is not paginating correctly. The older/newer links for page 2 are there, but when I click on older, it returns "no content found" (when what I expected ...
0
votes
0answers
69 views

AJAX Pagination not working

I have integrated an AJAX Pagination in my site sidebar, where I'm showing custom post type. Here is my code: <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $new_query = ...
0
votes
0answers
59 views

Custom post type pagination, single page issue

After having problems getting pagination working at all for custom post types, I've read that the custom post type name and the page name cannot be the same. So I set out from scratch: I've created ...
0
votes
1answer
16 views

Pagination for custom query won't let me back on page 1

I have a custom query … <?php /** * The loop that displays the posts. */ ?> <ul class="post-items"> <?php $args = array( 'post_type' => array('post', 'wr_raffle'), ...
0
votes
0answers
53 views

Comments orderby comment date not working

I have a template to get the comment replies to a user and display it on a static page. It works reasonably well in so far as the correct comments are displayed but whatever I try I can't get the ...
0
votes
1answer
38 views

Switched from query_posts to wp_query, pagination no longer working

Switching a loop on a static front page from query_posts to wp_query. All is working other than the pagination link (which used to work). Example can be seen live here in "work" section. Here is my ...
0
votes
1answer
51 views

Pagination always adding “Next” link when results come from Custom Post Type WP_query

Or at least that's how it seems. I have a page to which I pass several arguments to query post_meta for a custom field and I always get an extra "Next" link no matter the number of posts. If querying ...
0
votes
0answers
108 views

WP Page Navi Not Working in my Custom Query - Events Page Only

I'm using the same custom wpquery format in my NEWS page. And my pagination uses WP PAGE NAVI plugin. It does work on my NEWS PAGE but doesn't work on my EVENTS PAGE. Plugins used: 1. WP PAGE NAVI ...
0
votes
2answers
27 views

Unable to paginate a custom page query

I have this code on a page called Categories. <?php /* Template Name: Categories */ get_header(); ?> <section id="primary" class="content-area"> <main id="main" ...
-1
votes
1answer
51 views

Pagination with Custom Post Type not working on index.php: I get a 404

I've read many posts about the same problem but none seems to work for me. I have a query for a custom post into the index.php. When I go to page 2 I get a 404 error. The same code works like a ...
0
votes
2answers
146 views

Custom wp_query pagination - next_posts_link() or wp_pagenavi() always empty

I'm aware this is a topic discussed to death, but I have read through many solutions and can't understand why my pagination simply isn't working. I have a very simple custom wp_query: $current_page ...
0
votes
0answers
65 views

Custom query, static page pagination and canonical

We have a custom query used in a template file, which is a page builder, with pagination that query latest posts. The problem is with Yoast SEO plugin and it's canonical URLs. When we navigate to any ...
0
votes
1answer
60 views

Pagination not working with custom wp_query

I am trying to make a custom search plugin but pagination does not work (it shows up with the correct number pages but does not function properly). Relevant part of the search plugin (from the main ...
0
votes
2answers
149 views

Should $found_posts be returned as string in 'found_posts' filter hook?

In general a function that hooks into the found_posts filter looks like this: add_filter( 'found_posts', 'adjust_offset_pagination', 10, 2 ); function adjust_offset_pagination( $found_posts, $query ) ...
0
votes
1answer
112 views

What is wrong with this pagination code?

I'm trying a new approach to paginate posts returned in a category.php file. I want to see snippets of 10 posts at a time. Filename is category-xyz.php and this worked before I changed to this method, ...
4
votes
1answer
238 views

Different 'posts_per_page' setting for first, and rest of the paginated pages?

How do you set the posts_per_page query setting so that a different number of posts are displayed on the first of the paginated pages (of home, archive, search, etc.) and the rest of them? For ...
1
vote
1answer
331 views

How to paginate attachments in a secondary query as gallery?

I have this code that shows all images attached to my post-type. Is there a way to paginate those? I have like 25 pics and I wan't to avoid scroll as much as I can. Code: <div class="galleries ...
0
votes
1answer
58 views

'paged' in wp_query doesn't work

I try to add a code to my wordpress blog show previous posts(in a previous page). I try this code but it don't work: <?php $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; $args = ...
0
votes
0answers
66 views

next_posts_link not working with custom query

I am trying to create a pagination system through my posts. Here my code: <?php $paged = (intval(get_query_var('paged'))) ? intval(get_query_var('paged')) : 1; $args = array( 'post_type' ...
2
votes
2answers
331 views

Custom query form submission pagination

There is a question very similar to mine, which can be found here. The difference with my question is: my search form is on several pages (page.php and single.php) and I don't use wp-pagenavi. I've ...
0
votes
0answers
51 views

Custom Page Pagination

Hoping someone can help me with a problem. I am using a custom page to display all posts with pagination, I noticed last night in webmaster tools that I am getting some soft 404's from the custom ...
0
votes
1answer
61 views

wp_query pagination links producing 404

I've searched thousands of related posts and can't seem to get the pagination to work on this loop. As soon as i click next page i get a 404 //get the search term if (!empty($_GET["s"])){ $s = ...
1
vote
0answers
161 views

Pagination with custom query, custom search form, single and pages, ajax and no plugins

I've read a lot of posts here about pagination with custom queries and tried the suggested answers (like this one). It seems however that my situation is a little more complex, and in the existing ...
0
votes
1answer
41 views

I am officially missing something about transient posts

I have no issue creating transients. What I have an issue with is pagination - and I have made posts on it before and every one sates that the query must look like, for example: $queried_post ...
0
votes
3answers
289 views

Pagination broken when merging search results with additional WP_Query

On the search results page (search.php) I would like to perform an additional WP_Query to keep a specific order of search result types e.g. search results from authors should always be shown before ...
0
votes
1answer
72 views

Pagination works in custom query loop but it doesn't work in shortcode

It is possible for shortcodes? Paggination works fine on custom template page.But I want to display the posts with shortcodes. Posts are displayed well.But pagination works incorrectly.The same posts ...
1
vote
1answer
120 views

pagenavi with merged wp_query [duplicate]

i need to use wp_query to excute posts from 2 separated keywords using s=keyword so i have found this answer & it is very very useful Combining queries with different arguments per post type ...
0
votes
2answers
70 views

Pagination With Custom WP Query not functioning

I have the following custom query and im attempting to paginate the links of previous archive posts using the example from the wordpress codex ...
0
votes
0answers
12 views

Pagination not shown at index page but displayed at other pages [duplicate]

Somehow my pagination is not shown on the index page of a customised page template. But it does show the previous / next posts links on the other pages like mypage/paged/2/ This is the code that I'm ...
0
votes
1answer
20 views

Query Not working as expected

So I wrote a rather - unattractive function - a while ago and I was re-factoring some code and I realized my query function doesn't work ... I recently made a post about how my tansient posts were ...
0
votes
1answer
266 views

Pagination for Custom Taxonomy Page [duplicate]

I'm having an issue getting my custom taxonomy page to paginate correctly. I looked through other examples posted on this forum, but I could not get my second page to not return a 404 error page. ...
0
votes
1answer
68 views

Trouble with pagination

So, been reading tons of posts on here and int he Codex but just not having any luck. I have a custom post type called Work. On my portfolio page I have "posts_per_page" set to 12. In total in this ...
0
votes
1answer
89 views

WP_query paged pagination with excluded category still counts it

So im making a custom WP_query loop with paged navigation. I want to show 4 posts per page in a specific category. This is working fine, except the next_post_link() seems to still count the excluded ...
0
votes
0answers
58 views

Custom Post Types and Rewrites

I have a custom post type registered using Custom Post Types UI plug-in. It has a rewrite rule: rewrite' => array('slug' => 'apps/iphone-ipad', 'with_front' => '1'), I am using a custom ...
0
votes
2answers
113 views

How to add pagination to wp_query [duplicate]

I have a custom loop and I'm trying to break it up into several pages but I'm not getting the next and previous links to show. Here is my code: <?php if ( ...
0
votes
1answer
27 views

Can't get pagination to work with this WP_Query loop

I know pagination isn't as straight forward with WP_Query as it is with other loop types but normally I don't have a problem with it. I'm editing a site for a client and this is their current loop; ...
1
vote
1answer
70 views

Transient pagination not working properly

So I wrote the following to create a transient: $wp_object_i_created = new WP_Query('cat=1'); set_transient('category_one_posts', $wp_object_i_created, 60*60*1); Ok so then I decided "Ya know lets ...
2
votes
2answers
226 views

Paginated Taxonomy Term Archive including one post per term

I have a custom query which gets all the custom taxonomies for the custom post type and displays the latest post in each. At the moment it pulls in all the taxonomies. Is there a way I can limit the ...