Your error is likely get_query_var('paged') should be get_query_var('page').
However…
You should avoid calling query_posts in the template, it is a waste of resources, as you’re just discarding the original query which has already happened.
Hook pre_get_posts to instead alter the query before it happens:
function wpa60728_pre_get_posts( $query ) {
if ( 'bvdirectory' == get_post_type() && is_main_query() )
$query->set( 'posts_per_page', 2 );
}
add_action( 'pre_get_posts', 'wpa60728_pre_get_posts' );
Related Posts:
- How to disable pagination (next/previous links) on post type archive?
- Pagination not working past page 3 on archive page of category
- Display “Page 3 of 5” for a paginated post
- Single Page View for Paginated Posts
- Change class=”page-numbers” in pagination
- How to get post pagination like this
- Pagination Not Displaying on Custom Term Archive
- Non existing blog pages are not redirected to 404
- Limit number of pages in pagination
- paginate function in archive for custom-post-type
- wp_link_page – wrap current page element
- How to create pagination on archive.php template
- Jetpack Infinite scroll conflicting with theme’s pre_get_posts custom posts_per_page
- Having issues with wordpress pagination with multiple categories
- Paginate Child Pages Content on Parent Page
- Pagination is somewhat working on frontpage, doesn’t update when “prev” is clicked
- Blocking author paging for blog entries?
- Get total posts found, but while using limit for pagination? get_posts
- Show post count in wordpress instead of page count in wordpress pagination
- remove paginations functions only on home
- WordPress Pagination with Get Value
- Show number of posts and number on current page (revisited)
- Rewriting get_next_posts_link() for custom loop
- Customize WordPress Core Template
- How to add a zero before numbers in WordPress Post Pagination?
- next_posts_link does not work when querying a specific category
- Tabbed content with Pagination
- Next and Previous buttons for navigation
- Offset a post in the loop, with using PageNavi Plug-in
- Last page in pagination does not match max_num_pages – the overall post count is less according to pagination
- Frontend sorting
- Adding pagination on template page wordpress
- Pagination on custom post type not working if permalinks set to rewrite url
- Theme Option not Working Inside a Function
- Paginated Archives or Loop by Month
- search with pagination not working as expected
- Pagination Not Working on `WP_Query` Archive Page
- Cannot go back to the first paginated page using pagination links
- How do I make my pagination work?
- Pagination issue in archive.php
- Remember form field values with page navigation
- How to use pagination?
- How to get category/tag in URL for Pagination links?
- Pagination on and tag.php not working
- Include a leading zero in pagination
- Pagination not work on page but work on category
- Can I use paginate_links() to add a pagination list, yet prevent it from inserting links?
- Custom category.php paging shows the same posts
- Page links are not working after moving domain [closed]
- Pagination Links showing incorrect previous page number
- How to limit page pagination… again
- How to remove /page/2/ from home page?
- Conditional pagination li’s
- Paginate Links – Mid Size Less Than 2
- Problem when I try to insert pagination
- Different page template for paginated content?
- tax_query does not work with pagination with custom query (both wp_query and query_posts())
- Pagination for multiple queries merging into one Loop
- paginate_comments_links() not working
- Adding paging to get_posts()
- Can I paginate this get_attachment query?
- paginate posts on admin page
- How to Show Next-Previous Link Only
- WordPress static home page pagination not working
- How to create a WordPress gallery with pagination
- Broken pagination links on WP 4.9.10 blog pages
- Excluding posts without affecting the number of posts per page
- get_next_posts_page_link adds Inexistent directories
- How to add post page pagination to template part?
- why pagination not working in page template
- Custom pagination in wp
- 404 page not found on pagination in home page while navigating to next page
- Pagination in Archives
- Only show pagination when post count exceeds show post
- Pagination – linking back to base page – Page 1
- Custom Pagination shows same posts on each page
- Numbered pagination showing all numbers instead of paginated blocks
- Show next and previous page number
- Search pagination link redirecting to a link that doesn’t work with pagination
- why custom post archive gives always no more than 10 posts despite of paging settings?
- Custom Query & Rewritten URL Pagination 404
- Search URL gives 404
- Adding pagination to query for custom page
- Main page paginate_links issue
- WordPress 404 pagination (/page/2) error?
- Custom pagination generates title 404
- WordPress creating 404s under blog tags
- Removing template part when not on homepage if / else
- Paginate template name
- WordPress pagination URL posts not load
- How to reduce the number of pages in pagination
- Pagination not working for archive
- Use cookies in pagination
- foreach pagination
- Always show Next and Previous button in wp_link_pages ?
- paged query leads to 404? [duplicate]
- Pagination only working on index page not on a template page
- I want the “next” and “previous” buttons to appear in my custom navigation function
- How to make infinite scroll by dividing the content?
- Change Pagination Default to “/2/” Query String “?page=2”