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?
- WordPress custom taxonomy template not working
- Custom post type posts don’t show in archive widget
- How to specify a template for a path like http://example.com/something?
- Custom templates for a specific category
- Custom post type pages return 404 page?
- WordPress 3.9 not using custom template
- Archive not sorting correctly
- Template files for Custom Post Type and Taxonomy
- Set templates for custom post types
- How to Create Template File for Parent Page of Custom Post Type
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Custom post_type search pages
- What’s the name of the custom post type yearly archive template?
- Archieve.php not loading for custom post type
- multiple custom post type on category page
- Custom Post type & Taxonomy 404
- Main query not querying any posts in custom taxonomy template
- Custom Empty Results page for my Custom Post Type
- Custom posts template page
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- Taxonomy archive 404ing (not term archive)
- Return the name of the post type
- make permalink go to a custom single.php file
- Add Previous/Next Buttons to CPT Single Pages Only
- Assign CPT archive page attributes
- Creating Sections for Post Types
- Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?
- Custom post types with categories in template
- Custom taxonomy or custom page templates?
- Dynamically insert an article at the top of a taxonomy archive – or?
- Archiving custom post content?
- archive as a page, so that it can be added in the wp_menu_nav
- Creating separate feeds for custom post types
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- Which file/template is in charge of taxonomies for custom post types?
- How can I trace inconsistency in loading a template?
- How do I add custom HTML to the content of an archive page’s posts?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- How to get_term_meta on single custom post?
- Archive links for custom post types
- Show All Custom Post Types On A Single Archive Page
- Use the custom post type archive for taxonomies?
- Assigning alternate single-{cpt} template based on blog_id in multisite
- How do I find a way to create a global single.php for a custom post type?
- How do I assign a block template (.html) to a custom post type?
- Templates for hierarchical custom post type
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- How to use single.php for creating, reading and editing Custom Posts with ACF
- Archive Page for Multiple Custom Post Types
- Apply template by path/slug related to custom post type?
- Can’t access private custom posttype single- or archives-page
- assign different templates to custom post type with homepage loop
- Display Date & Author Info on Custom Post Type Archive Page
- How to get the current category with custom posts
- Custom post type is using the index.php template
- Assign a template to a custom post type when displayed by the main loop on the home page
- How to constrain the results to a specific post_type on tag archive page?
- Get the link of the first post of a custom taxonomy in a custom taxonomy list
- Get template part with CPT and Custom Taxonomy conditionals
- How can I relate custom post types?
- Template code to split a post and print a custom field?
- Displaying a list of Contacts
- How to create a template to show child terms of a MAIN taxonomy
- How to change single custom post template by custom taxonomy?
- Dynamic category name in query post
- Custom Post Type homepage template
- Custom Post Type Archive Pagination
- Custom permalink structure for remote content pages
- How to know which archive page is active
- Setting a homepage – doesn’t seem to work
- Need to have an archive widget which organizes and displays a custom post type using a custom date field
- How to create a archive template for custom post type [duplicate]
- Archive page for custom post type and custom taxonomy
- WP not recognizing custom post type / template
- Custom post type draft use wrong template
- List of a specific Custom Post Type in Custom Template
- Why does my URL keep returning 404 error code?
- pre_get_posts works in post type archive but not in single post
- Create a custom taxonomy template that loops through child categories in term order?
- Menu’s breaking, now showing all page links on site
- Display CPT index page as front/home page
- How to prevent a custom post type from using the archive.php template?
- Display Posts Query with IF function