Consider removing that extra the_post();
after $the_query->the_post();
.
That will solve the problem. You may just use that once on the Query object. You have a custom quesry, then just call it on that exact object is required.
Related Posts:
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- Page is defaulting to archive page and not designated template
- Custom Post Type Archive URL takes over page URL
- where can I see my custom post type archive template?
- How to show the archive / post type description on Single templates
- Create template for taxonomy results limited by Custom Post Type
- How can I get this request to use the Custom Post Type page template instead?
- Archive for a Taxonomy of a Custom Post type
- how to remove pages loading with the archive templates
- How can I use archive-{post_type}.php theme template?
- Custom Post Type setup
- Archive Template being used instead of Category Template for Custom Post Type
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- Turning archive templates to a page template maintaining the slug
- Custom Post Type tag taxonomy “Page Not Found”
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- how to pass args for archive.php query?
- Can I assign a template to a custom post type?
- Searching multiple custom post types and pages
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Taxonomy, Terms, and Template Files
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- Setting up custom post type archives in WP3.1? Any luck?
- Using Templates with Custom Post Type UI
- How to show more posts on an archive page?
- Display all custom post types in archives.php
- How to Add Pages Under Custom Post Type URL Structure?
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- Custom Post Type Archive Template
- Custom templates for posts like for pages: page-{id} vs single-{id}
- Posts in Multiple Columns and Rows with one single loop
- Removing CPT slug from URL results in 404 error for archive page
- Multiple post types in archives (filter?)
- How to let custom post type posts show in standard post archive (like in homepage)?
- Display different gutenberg template from selected post attributes
- Custom post type archive sorted and grouped by date in post meta field
- Trying to manage templates on a blog with lots of custom taxonomies
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- Pagination Issue: Custom Post Type In Index
- Create second custom 404 page for selected post type
- Custom-post-type-archive: posts sorted/filtered by year?
- Custom Post Types and archives
- Create Template for Custom Post Type same like for Page
- Custom post types archive redirect
- just can’t get date-based archives per post-type to work
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- Root slug of taxonomy returning 404
- How to clone the “Projects” Custom Post type in Divi theme
- How to modify archive query with pre_get_posts to append CPTs?
- Custom post type content using custom fields without template
- Custom post type posts don’t show in archive widget
- Set templates for custom post types
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Main query not querying any posts in custom taxonomy template
- Return the name of the post type
- archive as a page, so that it can be added in the wp_menu_nav
- Which file/template is in charge of taxonomies for custom post types?
- How do I assign a block template (.html) to a custom post type?
- Dynamic category name in query post
- Custom Post Type Archive Pagination
- pre_get_posts works in post type archive but not in single post
- Menu’s breaking, now showing all page links on site
- Set generic reservation form for custom post type
- How can I increase the post count for custom post types only?
- handling templates and widgets for custom content types
- Is possible register two archive pages for single custom post type?
- users post count
- Custom Post Type Archive Page showing as 404
- Add custom template ‘sub-page’ to Custom Post type?
- Load info from customposttype into template page
- custom post template design with dropdown option
- Custom post type single page uses the right template in preview mode but shows a different template after being posted
- Post Attribute Section missing for Custom post type
- How to assign post to category
- Custom post type pagination problem – page 1 and 2 show same content
- The page or ad listing you are trying to reach no longer exists or has expired
- Custom taxonomy with custom post type template not showing
- Single taxonomy for different custom post types
- Values show up in custom home page but not in custom post pages
- Organising custom taxonomies and custom post types
- Include template if a post is a single product
- Custom nav menu current item custom link problem
- How to decouple custom post types components from template?
- Show Templates in Custom Post Type Editor
- Parent to another Custom Post Type – Template files not being recognized
- Stop Custom post type from being searched via URL
- How to avoid hardcoded text in a custom page template?
- archive-{custom_post_type}.php not getting recognized wordpress
- Having some trouble properly displaying Custom Post Types in templates
- Custom Post Types Archives and daily/monthly joke
- query_post while (have post) get_template_part()?
- Display results from two Custom Post Types in page template
- Using custom post types within a section of a template
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Pagination not working for archive
- Problem retrieving custom field for a custom post type
- Only One Post of Custom Post Type Appearing on Template Page
- Choose custom post type template by category
- using a template for more then 1 page
- Custom post type is_singular condtional not working when managing sidebar display