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
- Meta query with boolean true/false value
- Search multiple custom fields by using meta_query
- category__in not working on custom post type
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Date query for a custom meta field
- Set default option in dropdown of WP_Query?
- WP_Query pagination using only numbers instead of /page/1 on URL
- WordPress custom post type archive with description
- Multiple post type queries (with specific arguments for each)
- Custom WP_Query not returning results when querying custom post type
- Link users to a custom post type
- Custom Post Type Loop within Shortcode
- Pagination on category page with custom post types
- Query custom post type in the loop
- Including Custom Meta with posts_where query
- Get latest 3 posts from multiple CPT in one query
- Display upcoming Events for next 7 Days
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- Orderby CPT custom fields not working
- Custom WP Query on custom meta and sort by multiple meta keys value
- Woocommerce search pagination not working
- How to order WP_Query by parent for hierarchical Custom Post Type?
- WordPress request fiter order by related post’s post_title
- WP_Query custom post type query not showing the exact post type
- Change sort order when using ‘orderby’ => ‘type’
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- Custom post type showing same Post on all Pages
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- How to get specific post meta by title or id
- How to properly rewrite pagination rules for a CPT to avoid 404 error on /page/2
- $post->post_meta not pulling any post in wordpress/php
- WP_Query of custom post type sorted by meta_key has unexpected results
- How to get the post terms from a child taxonomy
- display posts of custom post type with custom taxonomy
- How do I show a link or ‘Read More’ button on a custom field excerpt when it is less than the word limit
- foreach loop inside the loop creating duplicates in output
- Sorting by meta_key different to search criteria?
- Shortcode / WP_Query in post changes context
- How to fetch posts that are stored in the different table than (default) wp_posts?
- WP_Query order custom post type with certain meta key value by post modified date
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Display custom-post type based on the Title matching the current selected value
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- Pagination in custom post type archive.php not working
- Custom front-end form for adding post – Category problem
- WP Query: If field X is empty, show posts based on field Y
- Sort custom post column by generated value?
- meta query condition don’t work
- How to search through all child taxonomies using WP_Query?
- Show custom post type event if current day using ACF
- Numeric pagination custom post type
- Custom post type category returns null
- Tell wordpress to show a single page instead of an archive page
- How to get post by meta value
- Filter custom WP_Query by first letter of a custom field – hopefully using Search and Filter Pro?
- 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
- Only show current category post
- get_post_meta for Custom Post Type ( CPT )
- Shortcode display CPT Query only showing 1 post?
- 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
- Query Posts From Multiple Post Types
- Fallback if statement based on the number filtered from it
- Register a title automatically with a relationship field
- Get images only from a certain post type
- querying to custom field over ACF REST API
- Why custom search engine only searches in post titles of custom posts?
- Can I add a wordpress page using the slug for a CPT rewrite