0
votes
1answer
20 views

posts_nav_link on single post template

I have a post type called journal and on the single-journal.php template I am querying the rest of the journal posts like so: <?php query_posts( array( 'posts_per_page' => 4, ...
0
votes
0answers
16 views

Posts Duplicating due to Pagination and Custom Query

I have a custom meta field named “price” and I would like my main query to order the posts from highest to lowest price. Currently I have it setup like this: <?php $paged = ...
0
votes
0answers
70 views

WordPress multisite custom query pagination issue

I have a site with a query to grab by a particular category. The current site is also running a multisite system. Before upgrading to 3.9 this query worked fine, but after updating to wp 3.9 & ...
0
votes
0answers
119 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
58 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
1answer
117 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; ...
-1
votes
1answer
36 views

Limitless amount of posts in custom archive page

I want to get rid of pagination completely on my custom archive, I want everything on 1 page. How can I do this? Currently I'm getting my posts with: <?php query_posts($query_string . ...
0
votes
0answers
10 views

Pagination on custom template doesn't work [duplicate]

I have a custom template for my blog homepage and for some reason the pagination isn't working. I am using next_posts_link and previous_posts_link for the pagination. The main blog page is located at ...
-1
votes
2answers
1k views

Achieving pagination with `query_posts`

I'm using query_posts to build a list of posts from a single category, and I'm trying to add pagination to this setup. Here's my code: <ul> <h1><?php the_title(); ?></h1> ...
0
votes
0answers
133 views

Post Filter clearing on pagination $_post

I have a form, in which users can select what taxonomy they want the posts filtered by. It works fine except that it doesn't paginate. When I click on the next page of results, it clears the query. ...
0
votes
2answers
245 views

how could I get the pagination as I want to when query posts using get_posts function

I am using WP3.5, and I have a post_list.php which will show all the posts order by post date DESC. Everything is ok except pagination. I have 15 posts, for test purpose, I want to every page show 2 ...
0
votes
1answer
261 views

get_next_posts_link() stops displaying at page 4

Please start by taking a look at this quick video: http://www.screenr.com/8vSH The problem: get_next_posts_link() disappears on page 4. That is, the "go to older posts" link disappears once I am in ...
0
votes
2answers
310 views

Paginate pages with dynamic query

I have a wordpress page that has a series of listings and a searchbox at the top. The search allows the user to filter posts by creating a custom WP_Query object based on what they selected. I am ...
0
votes
1answer
58 views

How to inject a post within a loop

I'm trying to inject a post while the loop is running. This post will be injected on a condition, so if(x == j){ //inject post here } I see this would seem easy to do, but i have a posts_per_page ...
0
votes
1answer
57 views

Pagination linking to first page

I have created a query which work correctly and displays the pagination correctly. However when clicking the links /products/category/application-range/page/2 the page will load and go back to ...
1
vote
1answer
647 views

Using loop pagination on single.php

I want the main front-page loop to show in a section on both index.php AND single.php templates, with pagination. Pagination works fine on the homepage, but not on single posts. This is the code ...
0
votes
1answer
503 views

filter posts by meta key with pagination

Trying to filter out specific posts that have certain meta_key from the main query... problem is it doesnt work with pagination which is my issue here. Anyone knows how to solve this? $paged = (end( ...
1
vote
3answers
74 views

Trouble Making WP_Query paged

I'm using the query below in the index.php file as the main query, whenever I try to go to the 2nd page I get a 404 error, I tried using posts_per_page but to no avail. <?php $args = array( ...
0
votes
1answer
867 views

Pagination on category.php and tag.php not working

i'm using a query-loop on my template pages like this: <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query = new WP_Query(); ...
0
votes
1answer
2k views

Paginate WordPress Category Pages

I am using the following query on my category.php template: <?php $paged = (get_query_var("paged")) ? get_query_var("paged") : 1; query_posts("posts_per_page=2&paged=".$paged); ?> ...
0
votes
1answer
479 views

pagination does not work with query_posts. Help! [duplicate]

I made ​​a separate page template (added sidebar), this page contains all the posts. Pagination works! But, if this page set as the home page, pagination is not working! Please help find solutions ...
0
votes
1answer
156 views

query posts returns 10 records

I am using the following code to fetch records from a custom taxonomy. if ($_GET['post_type'] == "developments"){ ?> <?php global $wp_query; ...
0
votes
1answer
487 views

Having trouble generating pagination links on custom query

I'm using a custom query on a page after the initial loop to list some posts from a category I'm associating with that page. Im doing this: query_posts(array( 'category_name' => $name, ...
2
votes
2answers
1k 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 ...
1
vote
1answer
233 views

Too many posts cause slow load when paginating

I have about 10k posts and I made a page that lists all posts but it is paginated every 54posts. It gives 131 queries in 6.730 seconds which is pretty slow to load. Is there a way to make it load ...
2
votes
2answers
98 views

Different amount of posts on homepage than paged pages

I've done some searches here and on Google but everything I'm finding isn't working correctly. I was hoping to post my code here and get help with where I'm going wrong. On the index page of my ...
0
votes
2answers
40 views

send user to first page of results when reposting to page?

I have a custom template with a drop-down that filters posts by category. I do it by making the form post to the page itself and then catching the argument and using it in a query (see code below). ...
1
vote
2answers
1k views

Custom posts per page does not work with pagination

I have one page in my template where I would like to set a custom posts_per_page. Here is the code I have used: <?php global $query_string; query_posts($query_string . '&posts_per_page=4'); ...
0
votes
2answers
893 views

query_posts pagination will always show identical content

Anyone here see why my pagination won't work? I can get "previous page" to show up, but when navigating to "page-2", the content will stay identical to the content on "page-1". <?php /* Template ...
1
vote
3answers
2k views

query_posts and pagination, still stuck after much research

I need to paginate some custom posts...I can’t see why but I’m getting 404’s when going to the next page. Here’s my code: $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts( ...
2
votes
3answers
864 views

Pagination on custom query

I'm using the following code with query_posts to put together a custom search: $args = array( 'post_type' => 'species', 'meta_query' => $meta_query, 'tax_query' => $tax_query ); ...
1
vote
1answer
2k views

pagination not working for category.php (custom post types in categories)

it works everywhere on my site but it isnt working in category.php. When i click page to it goes to... domain.com/category/cat-slug/page/2 by the way this is showing custom post types within certain ...
0
votes
1answer
798 views

pagination in author.php template returns 404 error

Hi to the community!!! I need some help with pagination in author.php template. I have pagination working in all my loops except in authors.php that i get a 404 error. In my settings/reading i have ...
0
votes
1answer
173 views

Can't get pagination to work for sticky posts only

I don't get my pagination to work. I need to filter my posts on sticky posts and display only two per page. Tried almost everything but can't get it to work. It is totally ignoring my posts_per_page ...
1
vote
1answer
6k views

Wordpress pagination with get_posts?

I need to make adjustments to a horribly written WP theme that (a custom theme that was written in tables, and bad code). The theme has several custom templates, but pagination wasn't used and ...
1
vote
1answer
2k views

Wordpress pagination showing same posts on each page

I need to make adjustments to a horribly written WP theme that (a custom theme that was written in tables, and bad code). The theme has several custom templates, but pagination wasn't used and ...
0
votes
3answers
47 views

Not displaying any articles on a custom made file

I have created the file latest.php in the public_html so that when I go to www.domain.com/latest.php it will show me the latest articles. Sadly, nothing of the posts came up. Later, I will sort them ...
0
votes
3answers
234 views

How do I use pagination in WordPress?

I'm using the index.php file and editing this so that it displays two articles at a time. I'm using query_posts( $query_string . '&posts_per_page=2' ); before the main loop and it's displaying ...
1
vote
2answers
3k views

Custom loops, sticky posts, and pagination nightmare

I've tried everything. I've looked at every. single. question. here, on StackOverflow, the WP help forum, googled 10 pages deep and literally tried EVERY combination of code I could find, for the ...
1
vote
1answer
999 views

Using ajax with paging and a custom sub-query

I have a page that uses three queries to retrieve a variety of content. One of those queries grabs posts that are related to the topic of the page. Since these posts can be of all sorts and related ...
0
votes
2answers
621 views

Pagination for query_posts();

I know there have been many question like this and I've read them, but I still cant get it working... I have this query: query_posts(array('cat'=>3,'posts_per_page'=>5)); And I simply display ...
3
votes
2answers
2k views

Custom post type archive 404's with paginate_links

im using paginate_links function to create pagination on my custom post type archives, no matter what i do im hitting 404 errors when going to view page 2 (ie clicking to go on one page in the ...
4
votes
1answer
5k views

Custom Taxonomy not working with posts_per_page in new WP_query (pagination problem)

OK, so i'm messing with Custom Taxonomies for the second time and in both instances i've run into this problem where using the posts_per_page argument in either a query_posts or WP_query scenario.. ...
0
votes
1answer
988 views

Wordpress loop problem: Multiple loops, index.php and is_paged causing duplicate posts on next page

Hey everyone. I'm not sure if what I'm experiencing is a result of a bug (due to the recent upgrade to 3.1.2) or poor coding. Ever since i upgraded to version 3.1.2 ive been experiencing a problem ...
0
votes
2answers
416 views

Querying posts only if the current page is not paged?

For example, I want to query posts in a page. But I don't want to show them when the user clicks the pagination links. Pretty much like what happens in Youtube. You only see the Top comments in the ...
2
votes
1answer
2k views

How do i paginate query_posts with numeric pagination?

I have post type called blog and i'm showing posts for the type using query_posts, eg. query_posts('post_type=blog'); I would like to add pagination for this post type in the following format. ...
0
votes
2answers
14k views

Setting posts per page in query_posts

Bear with me here.. The default posts per page in the admin area is 10. During some testing I wanted to change the posts per page for my custom post archive to 2 (in WP 3.1). The problem is that I ...
0
votes
1answer
1k views

Showing one post from each category, paged?

I want to display one post from each category per page. So the first page would contain the first post of cat A, the first post of cat B and the first post of cat C. The second page would contain the ...
0
votes
2answers
1k views

Modify main loop query for paged and meta key

I try to change the main loop in such a way: I have a meta key for displaying featured items, that should be shown only on the home page of the a blog. I pull them in a code separate from the main ...
2
votes
1answer
3k views

Pagination on archive.php page

I have an archive.php page with the following code: <?php // Start your custom WP_query $my_query = new WP_query(); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = ...