please try this:
<?php if( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
Thank you
Related Posts:
- Filtering a WP_Query meta_query by numeric values isn’t working
- Query by 2 values of a repeater ACF field
- Query current and future events, ordered by begin date
- Display posts if a custom field value is equal to another custom field value
- Remove duplicated values from a loop
- Custom Post type and Custom Field WP_Query
- Display multiple custom post types and sort them chronological by one of their fields
- WP_Query order by custom field, then randomly order some of results
- Troubles with acf/save_post and WP_Query
- Query custom post type with ACF Date
- Stuck in Order by more then one
- Order Custom Post Type by Custom Field Value
- Query Custom Post Type Taxonomy term with multiple parameters
- Query based on custom fields start and end date
- Why is my WP Query not returning first result’s post meta?
- Group by custom field value (start and end times)
- Using WP meta query to show custom post types by a start and finish date
- Create if else for post types in WP_Query ‘post__in’ values
- Sort custom posts by date and then by taxonomy
- Using ACF values in nested WP queries for CPT with date values in the past
- Filter posts by their related field’s custom field
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- Show specific posts with WP_Query using ACF Post object
- Linking posts together with Advanced Custom Fields “both ways”
- Custom Field as Custom Post type element class
- How to query posts by meta keys AND under specific category?
- Custom Post-type not returning the right child_of
- Display ACF object field data using Elementor Custom Query
- WordPress WP_Query Sort by 2 dates – custom fields
- WordPress duplicating posts from single loop
- Custom fields disappearing when a custom post type is assigned
- Getting custom taxonomy from custom post type
- WP_Query by a category id and a custom post_type
- How to check if I’m on a custom post type archive in the admin area
- How to put custom post types on front page
- Add custom post type items from frontend
- Counting Posts of a Given Post Type Having a Specific Taxonomy?
- Listing posts with wp-cli
- List events by month
- Use Custom Post Type as Custom Field
- WP_Query on custom post type not displaying, multiple loops & get_template_part
- How to create posts (not post template) to be displayed on projects page?
- WP_Query post at custom position
- Pull image from ACF field in a Custom Post Type
- Search tags in CPTs
- How to filter by custom post type in taxonomy archive pages
- Exclude the parent custom post-type posts only
- Woocommerce query specific product from specific category
- Get custom posts with certain ids in a custom loop using a shortcode
- Can’t get order_by meta_value_num to work properly
- orderby in custom WP Query does not work
- Unable to retrieve any posts of CPT in wp-admin
- Linking to the most recent post in a Custom Post Type
- Creating a navigation menu of all posts of a custom post type and their children posts?
- Including metaboxes from custom post types in global search — continued
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- Can I display custom post types in home.php or need page template?
- Sort posts in loop by the WooCommerce Membership of the author
- Custom post type showing same Post on all Pages
- How to get specific post meta by title or id
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- WP_Query of custom post type sorted by meta_key has unexpected results
- How to query for posts (hierarchical custom post type) that have children but are NOT top level?
- Create a WP_Query where if the first value of the first row is equal to the second compare other value
- Pagination for search results of custom post type [duplicate]
- Custom Plugin – Query CPT – Display Results
- All blog posts are not showing up
- Make Next and Previous on single-$posttype.php use the same order as archive-$posttype.php
- Custom post-type custom query – show all posts
- Display custom-post type based on the Title matching the current selected value
- Custom front-end form for adding post – Category problem
- Show custom post type event if current day using ACF
- Numeric pagination custom post type
- Changing default admin column sorting to an ACF Date Picker field
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Query a Custom Post Type using SELECT that has ACF fields to compare dates
- How do I get all authors posts of a custom post type outside loop
- WP Query filter search. Result show all posts instead just custom post type
- save_post affect creation and deletion
- Display posts of a hierarchical custom post type excluding parent posts
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- WordPress loop add heading before first of type
- get_post_meta for Custom Post Type ( CPT )
- WP_Query for CPT with filter by another WP_Query
- Is it possible to add query parameters on the archive page?
- Shortcode display CPT Query only showing 1 post?
- Query stopped working
- How can I base a query off of the current page post type AND a meta value from another custom post type
- how to load custom single.php?
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- WP_Query and two custom fields returns no posts
- Function that get ACF fields value before saving
- Fallback if statement based on the number filtered from it
- Register a title automatically with a relationship field
- How do I hide single category post on my post page
- WordPress custom field sorting, weird behavior: the latest post is at the end
- Default WordPress Query for a Specific Custom Post Type URL
- Dynamically count the number of custom post types associated to a custom taxonomy
- Quering a post object based on another related post object
- ACF Pro simple Business Directory – Requesting assistance with created Templates and associated Functions.php Coding