Perhaps you can take a look at this question and the answers and check if you really want to use query_posts()
as it is not recommended while dealing with posts pagination. Why not use pre_get_posts action instead? Or you can try something like this:
<?php
$custom_query = new WP_Query(array(
'post_status' => 'publish',
'post_type' => 'products',
'connected_type' => 'product_to_category',
'connected_items' => $post,
'order' => 'ASC',
'order_by' => 'menu-order',
'posts_per_page' => '10',
'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1
));
?>
Related Posts:
- Pagination on archive.php page
- Having trouble generating pagination links on custom query
- query_posts and pagination, still stuck after much research
- how could I get the pagination as I want to when query posts using get_posts function
- pagination in author.php template returns 404 error
- How do i paginate query_posts with numeric pagination?
- Pagination on custom query
- Custom posts per page does not work with pagination
- WordPress pagination showing same posts on each page
- WordPress pagination with get_posts?
- Using ajax with paging and a custom sub-query
- Custom loops, sticky posts, and pagination nightmare
- Querying posts only if the current page is not paged?
- query_posts pagination will always show identical content
- Can’t get pagination to work for sticky posts only
- How do I use pagination in WordPress?
- Modify main loop query for paged and meta key
- Post Filter clearing on pagination $_post
- get_next_posts_link() stops displaying at page 4
- WordPress loop problem: Multiple loops, index.php and is_paged causing duplicate posts on next page
- Achieving pagination with `query_posts`
- how to query posts by category and tag?
- How do I query by post format in WordPress 3.1
- Custom post type archive 404’s with paginate_links
- get_query_var(‘paged’) always returns empty
- How to set posts per page using WP_Query()
- How do I create a random post that will last for a day
- Custom Post Type “Event”: chronological list of recurring events
- Order by meta value, pro first, then free
- How to create an attachments archive with working pagination?
- Query posts by taxonomy term name
- Sorting problem with ‘query_posts’ funcion in wordpress. Sort by custom field not working
- Counter code for paginated category pages in wordpress
- Author List page: Exclude based on last post date
- Replace query_posts with pre_get_posts
- query_posts sort in multiple directions
- Filter query_posts by tag slug on “Tag Archive” page (when tag is 2 or more words)
- Warning: urlencode() expects parameter 1 to be string, array given in and not getting the preffered output
- Show Posts From Same Category OR Same Tag
- Using database meta_values to calculate new post order using pre_get_posts or a ‘request’ hook
- exclude ids through post__not_in
- Different number of posts on the front page
- Integrating post archive wtih another source and preserving date ordering
- Order posts using a custom array
- WordPress query_posts and orderby page order
- IF.. post meta show… Conditional Tag Help…?
- How do I correctly get all posts within the last year using the query_posts function?
- WP Pagination on Posts Search Results Page resulting from AJAX WP Query
- Show Only Posts Owned By Logged In User + my post
- Using loop pagination on single.php
- Custom MySQL Query with logic
- order posts by meta value on posts page
- Query_post($args)
- Get post and all posts after it by ID?
- trouble with query to fetch next and previous posts
- How do I make query use exact post title
- WordPress tax_query not showing private posts
- WordPress /page/2 not working
- Simple custom post query for all the posts or many of them not working
- Hook to return true when the_post() is used in a custom while loop
- My post repeats itself on the second page [closed]
- How to remove a plugin filter’s priority on specific loops (custom queries)?
- Proper syntax to add boolean in array()
- get_the_title outputs title until spacing; it does not get full length of title
- using query_posts to pull posts out of a category in a while loop. Getting odd echo
- Echo a numerical value in query_posts
- why to use query_posts() in custom page?
- Query posts to get all but the most recent post
- Always using the same ARRAY on different querys
- Display trimmed version of the_post()
- How to show the number of each post has been read in a while loop?
- Modify loop but keep the original query, what am I doing wrong?
- Post per page not working if no category specified
- Does WordPress run a post query when a page is invoked?
- Pagination, query more pages at once
- Multiple posts/pages in one page?
- Paginate pages with dynamic query
- filter posts by meta key with pagination
- Weird problem on if statement
- Issue with sidebar widgets not showing when I do custom queries
- Why would post_type be ignored in this query?
- query_posts call sets is_home() to true
- show all in query_posts on category.php?
- Best Query for blog posts
- Most Effective Method? Exclude Category and Number of Posts Per Page
- Script that gets the first tag of post and query all other posts with the same tag
- Trouble highlighting correct menu parent with wp_nav_menu classes while viewing “single posts”
- Custom query looking at multiple custom fields and properly sorting
- Latest 5 post excerpts from 5 different authors in Sidebar
- post var problem with shortcode loop
- Pre-existing arguments when using queries
- Sticky posts limit query and pagination for a custom post type
- Why does my WP_Query pagination on a custom page.php only loads the homepage?
- Help with query_posts function
- Get posts for each user
- Multiple post queries -category,posts per page,orderby
- How to can I search range of products using between
- send user to first page of results when reposting to page?
- Including post data in a sidebar occurring outside of and before the Loop
- How do I find the first item in the post array?