I found a solution for this. So for those of you who face a similar situation, here’s what I did (based on this solution : https://stackoverflow.com/questions/68871598/wordpress-query-loop-block-not-showing-custom-post-types)
So basically the custom post type that I had created needed to have this argument while registering the post-type in functions.php
'show_in_rest' => true
And then I just had to replace the post type in the query and all the results of the query showed up.
And for those using the Full Site Editor view in WordPress the Block section for query loop will then display the registered custom post type in addition to ‘Post’ and ‘Page’ in the drop-down menu.
So custom posts types are supported in the query loop and it works well!!..:-)..
Related Posts:
- query loop “inherit query from template” prevents setting sort order
- WP Query by Gutenberg block and get its attribute
- Using pre_get_posts on a specific core/query block
- How to query for custom field within Gutenberg block from outside of that post? [closed]
- Storing query variable and then using wp_reset_query
- Creating query to show which editor (classic or block) was last used to edit a post/page
- Why does get_posts only show results for Admins or logged-out users?
- Is it possible (and how to) query single Gutenberg blocks?
- Need help understanding this WP Query [closed]
- WP_Query Orderby meta_key and hide some meta_key
- Using something else instead of using 9 wp_query
- Multiple homepage layouts as selected by user from theme options
- wp query problem
- Block Editor – WordPress 6.1 – CPT Archive Issue – While the title changes in the loop, all records display the same data
- Problem making a WPQuery with ACF boolean
- get_query_var always returns the default value
- Appending to existing WP_Query’s meta_query if exists
- Exclude authors IDs from WP_Query
- Reload Query Loop When FacetWP Uncheck [closed]
- WP Query Compare cutting off last 2 dates
- WP_Query Taxonomy categories filtering
- Exclude a Woocommerce product from WP_Query
- How to Display Shortcode in the correct location, currently displaying before content after Page Title?
- WP ForLoop to compare meta information of posts to determine what post to display
- Using post_where filter only on main query NOT sidebard new WP_Query
- How to avoid bypass of search bar rules?
- Yoast primary category query modification
- Problem with get_page_by_path() using with WP_Query
- Filtering posts by archive showing all years
- How to combine two WP_Query objects?
- Hide products in uncategorized category from search results
- WP_QUERY with group by with custom fields
- Query where ANDing slug values not working
- WP_Query author parameter not working
- Loading two different AJAX requests on two different pages
- How to order posts on each different category?
- AJAX Breaking Offset Argument In WP Query
- WP_query only displays one of my custom post type entries
- WP_QUERY wrong ammount of posts
- Woo Commerce using WP_Query to get products that match price range, with an additional required product attribute
- Getting the post terms ‘wp_get_post_terms’ per post when within the functions.php file
- How to add sort order to incremented and paginated category loop
- WordPress 5.1 upgrade has lost the parent theme JavaScript
- Apply filters to main query instead of creating new one?
- Posts Query | Query to only show sub categories
- Issues with search after added meta_query
- Displaying pages on an archive page
- WP_Query returns different results from get_posts() [closed]
- Multiple pagename WP Query
- How to pass query string vars between admin pages?
- Query posts by Post title
- One WP_Query that always shows 1 post from category X and 1 post from “not in category X”?
- How to load a script code only in posts?
- How does WP generate the default $query in WP_Query based on the URL?
- Continue or break the while loop
- How to filter query loop block with a search string from the query parameters
- Differentiate Nested WP_Query from Parent
- Intiger meta value with ‘>=’ returns posts with lower value
- WP_Query – How to get all posts of specific days of week by custom field date?
- Sort by presence of thumbnail
- Update query for wp_posts and wp_postmeta
- Display posts with specific value first in query
- How to print term name inside wp post loop
- wp_query comment and meta query
- Need to add onclick javascript at backend of my wordpress site
- Show menus to one admin username
- How do you determine if a result in a search query is a post or a page?
- inserting content of 1 Post to in another with a template hierarchy
- get_posts custom field
- Get every post with value in meta key
- CPT category post/content is not showing on my page, Please review my coede
- Using get_posts to get posts based on a checkbox value with Advanced Custom Fields
- wp_query posts with custom fields number smaller than
- Slow Query On Search
- how to get category`s slug in WP_Query loop?
- Get posts in taxonomy randomly
- Loop posts based on permalink term
- Page navigation doesn’t seem to work when I add offset?
- it’s possible make a WP_Query with math operations?
- show posts with range meta key
- Trouble building a custom WP_query
- Save (and exclude) posts from loop to use in another loop on page
- Where is the extra SQL fields coming from?
- Is there a way to join WP_Query without a filter?
- WP_Query meta value order is not working
- How to apply a function to a metadata value before launch a WP Query?
- Multiple meta_key ordering with pre_get_posts
- Using WP_Query for categories instead of get_terms
- how to write wordpress query for multiple metakeys checking?
- WP_Query offset is returning post from prevois loop
- Tax query is not working!
- Get all posts with empty meta_value
- Count identical post titles
- Sorting search results with custom dropdown
- get_page meta query not working, maybe a bug?
- Posts query according to meta box date
- How to split a post and intercalate elements from a loop
- How to echo woocommerce category name
- Modify WP_Query using pre_get_posts but only for frontend query?
- create metabox to activate slider