Change your query code to this:
add_filter( 'post_limits', 'my_post_limits' );
// The Query
$wp_query = new WP_Query( $args );
remove_filter( 'post_limits', 'my_post_limits' );
In your theme/functions.php, add this:
function my_post_limits( $limit, $query ) {
return 'LIMIT 0, 30';
}
Related Posts:
- The next_posts_link() works only with original $wp_query
- Skipping first 3 posts in wp query
- Pagination not working on Custom Page Template
- The next_posts_link() works only with original $wp_query
- Automatically create pages in a post based on number of words
- Pagination for Pages and Posts
- When paginating a Page with the tag, how can the 2nd and subsequent page styles be customised?
- Converting multiple loops into one single loop with pagination
- WP_Query do not load specifed number of post
- Lazy Load using WP_Query pagination
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Blog post per page setting conflicting with custom WP_Query?
- How to insert 2 args into 1 Wp_Query for a slideshow
- 301 (static page instead latest posts)
- 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
- Start post pagination at 0 instead of 1
- Using wp_list_pages() after calling query_posts()
- Why are my paginated posts always returning the same results?
- Total number of posts in query (category/tag/author/search results/main page…)
- Why won’t pagination work?
- Getting blog pagination to work on page set as front page
- Pagination for normal (standard) posts on a page with a custom loop?
- Manipulated offset and pagination, can’t display last post anymore
- Go back to the exact post page number
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- How to create page with post content in it?
- Disable pagination in posts and pages
- Page with Category Returning 1
- Count posts for pagination
- Override wp_link_pages pagebreak with filter
- Is it possible to query a category with specified posts?
- Posts are not showing up on next page.
- Add wp-link-pages to post
- Pagination for custom query won’t let me back on page 1
- Can’t get pagination to work
- How to display a paginated list of posts from one category on a page? [duplicate]
- query_posts different amount of posts per page [duplicate]
- Stop WP from creating “Sample Page” and “Hello World!” post
- How to display by default only published posts/pages in the admin area?
- WP_Query: Why is sticky post not first item in loop?
- How to Group Posts by the First Letter or Number?
- Most viewed post for the last 2 days using WP_Query
- Adding Post Counts to Menu (Nav) Programmatically?
- This AJAX Code Doesn’t Work – Looking for elegant solution
- I’m having some issues with previous_post_link() and next_post_link()
- Can I change a post to a page by changing it’s type?
- Add a custom option to a page in backend
- Creating new page with pre-defined parent page
- Hide Post comments when displayed via WP_Query
- Blogroll – Different layout for first post
- disable column on post and user list
- Can a page_id and a post_id be same?
- How can I display widget in a Page or Post?
- Differentiate between posts and pages in search results
- Loop through all product posts?
- How can I sort posts by the date and a custom meta field?
- How to verify wp user password by sql query in wp? [closed]
- Making a custom Pagination for multi page blog post
- Lost draft under all posts and drafts
- Get user categories with most posts in it
- How to order posts by meta_value and title
- When open add new post or page WordPress add post with ID=0 continuously [closed]
- When changing pages to posts, how do you set up 301 redirects for the page URLs?
- WordPress query_posts by tag doesn’t work anymore(?)
- using is_paged for hiding image on posts
- How to group only VISIBLE posts? [closed]
- Shortcode with ‘year’ parameter
- WordPress 302 Redirect to Random Product/Post/Page
- When WP_Query only returns 1 post, how do I automatically redirect to that post?
- Limiting post list by taxonomy
- Different post views for different category views
- Indenting within a blockquote
- Change published date and time using SQL query for page in every 5 hour
- Search results with pagination not working
- Function is printing twice – any suggestions?
- Pagination Not Working With Custom Post Type Category
- How to add a block to a category page?
- How to use two query result together in one loop
- show loop id post , only first id can read
- filter posts based on menu_order
- calling pages instead of posts
- WordPress display page information rather than post
- Post Category link is same with Page link
- Show all posts from the tags without having to set all of them
- wp query custom orderby not custom field
- Page and Posts loading as index page? Not loading the content
- Converting Posts to Pages
- Thumbnail With Next/Prev Links Not Showing Next Post?
- Pagination and Related Posts
- how to show posts on different pages if number of post per page is one
- Get post title of faulty link on 404 error page
- Not displaying any articles on a custom made file
- custom sort posts in archive/taxanomy page
- When and how will php code in a user made WordPress page be executed?
- Trying to create shortcode listing custom posts, but formating not being included
- Show Title/Date/Excerpt of first post & only Title for rest in Query [duplicate]
- Get posts after calculating meta key
- Post data returning null [closed]
- Edit Page button is gone