Try this code here
<?php
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
if($paged == 1){
$posts_per_page = 100;
}else{
$posts_per_page = 300;
}
query_posts( array(
'posts_per_page' => $posts_per_page,
'post_type' => array( 'regularproducts', 'wpsc-product' ),
'paged' => $paged,
));
?>
Related Posts:
- Blog post per page setting conflicting with custom WP_Query?
- The next_posts_link() works only with original $wp_query
- Skipping first 3 posts in wp query
- How to exclude latest x posts from a paginated query?
- Query posts distinct authors
- How to get previous 10 days post from a specific date – WP Query
- Pagination not working on Custom Page Template
- Different amount of posts on homepage than paged pages
- Hiding posts in a list from specified categories
- Converting multiple loops into one single loop with pagination
- How would I get 1 latest post from a query for 5 posts?
- Exclude posts with empty post_content in wp_query
- Lazy Load using WP_Query pagination
- Improving WP_Query for performance when random posts are ordered
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Reset Popular post query?
- Why WP_Query(‘showposts=5’) shows only 1 post?
- is there a way to show the the post title after the image?
- How to exclude latest x posts from a paginated query?
- Random ajax load only works with posts_per_page set to -1
- How to : pagination in 3 different custom loops on the same page
- How safe is renovating $wp_query when doing WP_Query pagination in Page Template
- posts_per_page option limits the number of Gallery items
- wp_posts table: safely remove unused columns to save database storage
- Query Posts by Custom Field
- Nested WP_Query breaking loop
- WordPress query_posts by tag doesn’t work anymore(?)
- Why are my paginated posts always returning the same results?
- why the same code got different results when using query_posts in functions.php and index.php
- Query for first 3 posts to change the look and feel
- How to get posts published on the latest date?
- Getting blog pagination to work on page set as front page
- How to check in functions.php if there is data in a WP_Query?
- Shortcode with ‘year’ parameter
- On what hook can I get the queried object’s final state?
- wp_query with ajax
- How to give classname to post if post has no content?
- WP_Query: Show 10 posts in date order, first three random
- Random posts that always include a particular post?
- WordPress post filter menu
- Query function not executed between element [closed]
- Echo the number of posts being displayed
- WordPress query portfolio posts
- Display 3 posts with different HTML markup using a loop
- Change content off every sixth element
- Manipulated offset and pagination, can’t display last post anymore
- Show posts from two specific category in WP_Query
- How to create loop of posts except post ID defined via ACF field
- Displaying all posts from other sites on the network on one site
- Multisite how to display merged posts from two sites and sort by latest date?
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- Show 5 posts and than 3 posts offset with pagination
- wp_query args with relation
- Override wp_link_pages pagebreak with filter
- Manipulate query to show specific post
- Sort / Filter Queries
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- How do I control the fallback query after the original query returned cero posts?
- Remove duplicated posts in the loop if post has more than one category
- Pagination for custom query won’t let me back on page 1
- Adding a category at even positions on main loop with modified pagination
- Can’t get pagination to work
- How to inject a post within a loop
- The next_posts_link() works only with original $wp_query
- wp_query select if have comments
- Not displaying any articles on a custom made file
- Limit amount of pages shown in pagination within wp_query
- Custom layout manager for posts
- Get query result according to merged array
- Blog only showing one post even though more published
- WordPress loop uses unmodified posts array, why?
- wp query custom orderby not custom field
- Display WordPress Post By Date
- Admin is showing all posts on page 1
- Need help writing loop to display posts by categories in separate divs
- Custom Select Query pagination not working properly
- GUID to related post not in current language
- Get posts by category or author
- get_page_by_title() not working if special characters are present
- Modify WordPress loop after it has been run
- Get results from the main wp_query
- Query post category & remove any post id
- How can I display a specific number of post in a category via a url
- show latest authors blog post
- Show posts between two Custom Fields date
- WP Query between posts custom fields [duplicate]
- get “read more” with custom DB query like you would with WP Query
- Thumbnail With Next/Prev Links Not Showing Next Post?
- Query to get data of a post, if in category?
- Order posts by custom field
- Advanced Post Display/Pagination/Ordering
- How to get only current images of a post
- Ordering posts alphabetically by meta keys and title
- How to show the posts list into a static page? Problems to use the loop into a static page
- Post of a specific category – not to be seen in paging previous/next post
- Add wp-link-pages to post
- wordpress paginate, link to the right page
- Pagination working locally but not on live site
- How to pass multiple checkbox values to wordpress query?