you are quering the same posts over and over, and that is way you are getting the same posts, to fix it just add
'paged' => get_query_var('paged')
to your query arguments, so change:
<?php $portfolioloop = new WP_Query( array( 'post_type' => 'portfolio', 'posts_per_page' => 12 ) ); ?>
into:
<?php $portfolioloop = new WP_Query( array( 'paged' => get_query_var('paged'), 'post_type' => 'portfolio', 'posts_per_page' => 12 ) ); ?>
and just to make sure you are ok and to avoid errors add wp_reset_postdata();
at the end of your code.
Related Posts:
- wp_pagenavi() with custom wp_query()?
- Pagination URL in Custom Content Type
- 404 error next-page [2] PageNavi custom type taxonomy
- Pagination not working with custom loop
- WP_Query Pagination on single-custom.php
- Have different number of posts on first page
- Custom pagination for custom post types (by names)
- Custom post type pagination 404 fix?
- next_post_link() not working for single custom post type post
- Pagination with custom post type not working
- Custom post type archive 404’s with paginate_links
- How do I Paginate Search Results for Custom Post Types?
- Pagination throws 404 error on custom taxonomy archive pages
- Changing the URL Structure of a Paginated Custom Post
- Custom Post Type Pagination Not Working On Archive Page
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- Number of pages – multiple (custom) post types
- WordPress search: pretty URLs (permalinks), custom post types and pagination
- Pre get posts for single post
- Multiple Paginations on one Page
- Archive page…limiting posts per page
- Pagination not working with custom category template
- Shortcode Displaying Custom Post Types
- Custom permalink with pagination
- Related posts by author pagination not working on the production site
- Secondary loop pagination on custom post type single post gets redirected to first page
- Custom Post Type pagination – normal solutions aren’t helping
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- Pagination Doesn’t Work
- Numeric pagination custom post type
- Custom Post Type Rewrite Rule for Author & Paging?
- Pagination go to first page if i’m on last post
- Posts in Multiple Columns and Rows with one single loop
- Pagination throws 404
- Pretty paged permalinks in custom post type loop
- Newer/Older posts links display same posts on every page
- Custom wp_query pagination – next_posts_link() or wp_pagenavi() always empty
- Pagination with custom loop
- Group list of posts by taxonomy and allow for pagination
- Custom post type archive with pagination?
- Pagination on a custom page template
- Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug
- paginate function in archive for custom-post-type
- Pagination problems with multiple custom post type archive pages
- Pagination in plugin with custom post type
- Fix custom query pagination without changing site-wide posts-per-page settings
- custom post type paging not working past page 3
- Custom Post Type, Two categories, Two columns with Pagination
- Display “Post 2 of 4” on single post page?
- posts_nav_link on single post template
- Pagination problem in custom post type used as front page
- Custom Taxonomy archive returns 404
- Pagination gives 404 error
- Paginate Custom Post Type Page
- 404 error PageNavi custom type taxonomy | wordpress
- Creating a simple pagination for custom post type templates
- WP_Query pagination using only numbers instead of /page/1 on URL
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
- Pagination with custom post types results in 404 issues
- Pagination not working
- Pagination Custom post type
- Pagination Issue: Custom Post Type In Index
- Custom query form submission pagination
- Paginated Taxonomy Term Archive including one post per term
- WordPress rewrite my URL when i use pagination
- Pagination links not showing on custom post type admin list
- Pagination on Custom Post Type: 404 Error
- Custom Post Type Pagination & duplicate posts
- Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Custom post type archive page pagination
- Pagination problem
- How to load custom post archives sub-pages with ajax?
- Custom post type archive not regarding ‘posts_per_page’ => -1
- pagination redirecting from page number url before page requested
- Unable to get paginate_links working with a custom query [duplicate]
- Setting posts per page in query_posts
- Custom post type, permalinks & pagination, going wrong
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- Repeating posts when paginating random posts
- Pagination on category page with custom post types
- How to add pagination to wp_query [duplicate]
- Archive template for custom post type only lists first 10
- CPT: if more than X images are in post, use pagination
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Hard code the nextpage tag into my theme?
- Pagination for custom php code
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- How can i change the output of posts_nav_link();
- Pagination on a custom post type loop
- How to alter WP-JSON main query or best practise for custom endpoints
- Pagination is not working in custom post type
- Page vs Custom Post Types Differences/Issues
- How to display all posts from standard posts to custom post types in a loop with pagination?
- Previous/Next Link by Meta Value in CPT
- Custom post type not displaying all entries
- Custom post type (with parent-child relationship) singular page with pagination
- Pagination for Custom Taxonomy Page [duplicate]
- Pagination on with query_posts in custom post type template
- Pagination of Custom Post Types not Changing Posts