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
- order by numeric value for meta value
- numberposts? showposts? posts_per_page?
- $GLOBALS[‘wp_the_query’] vs global $wp_query
- Some doubts about how the main query and the custom query works in this custom theme?
- How to query posts based on lat-lng coordinate as post meta?
- How to query only for products with status “in stock” in WooCommerce? [closed]
- WP_Query displaying ALL posts
- Does WordPress sanitize arguments to WP_Query?
- How to trigger 404 for custom query var?
- How to combine tax_query and date_query in WordPress
- How to get any tag ID
- wp_query display posts from same category of the post
- Targeting specific pages in the loop
- WordPress custom archive page
- Order posts by meta value and Date
- Include Sticky Posts in Page Post Count for custom query
- Query sticky posts with thumbnails
- Show all parents and children in custom post type in right order
- Why is this coming back as null? Thats wrong. There is one post
- How to implement time filter to show random post 1 month for one category and 3 months for other categories
- Can you order posts from wp_query by two custom meta fields?
- Retreaving all images attached to current post
- Pagination working everywhere but the index page
- How to select posts from one category but exclude posts in another category?
- How do I search inside specific taxonomies in WordPress
- Order a query result by a numeric meta key even if it does not exist, but put the posts with meta key first
- How can you get first post, last post and post count in a category?
- What’s the purpose / logic of split_the_query in WP_Query->get_posts
- exclude posts with a specific custom field and value
- Redirect page when URL parameter not set
- list pages using page.php and NOT page-{slug}.php
- Moving the array pointer inside a WP_Query while loop
- Help with WP_Query – Too many mySQL queries
- WordPress Pagination changes my template
- wp_query ignoring custom post_status
- Query posts(CPT, pages , hierarchical) by Ancestor ID
- Input check to custom post type query
- Get a list of posts with associated meta_value
- Show all data in database table and make it into an interactive table
- Combine two queries into one to use in loop
- Shouldn’t I be able to modify the main query by this filter?
- Get all posts which was posted on X Days WordPress
- Admin Page Post Id wp_reset_postdata not working
- Multiple queries and performance – wp_query
- Display single most recent post in category on every page of category archive
- Executing query_posts after wp_insert_post
- Redirect Search to Form When No Product Results Are Found
- wp_query comment and meta query
- Show menus to one admin username
- inserting content of 1 Post to in another with a template hierarchy
- get_posts custom field
- wp_query posts with custom fields number smaller than
- Get the child category ID of current category
- Related Posts Excluding Certain Categories
- Unlimited Page Sitemap Link
- Limit number of posts in WP_query per month
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- how to translate countries output from wp database?
- Custom query does not find pages
- Custom taxonomy in WP_Query not working
- Display posts ONLY from the current logged in user and current week/year/month Elementor posts
- What’s wrong with this meta query? (order by meta key, then title, doesn’t work)
- Pagination repeating posts on search results
- Change normal grids to masonry grids
- order posts by a secondary query that counts items
- How to use wp query in my custom page without including header and footer in wordpress
- SELECT TOP 1 in wp_query for each groupby meta value
- Get unique post by meta value using wp_query
- WP_Query, ACF field and array
- query not working for ordering by meta_key
- XMLRPC pingback.extensions.getPingbacks not work with parameters
- Get posts meta_query by repater field
- WordPress pagination not returning posts on second page
- Query 3 meta_key and orderby
- How can I use two custom fields in WP Query
- How can I use a specific wordpress page template if certain words are used in page title [closed]
- wp-query with a tax-query relation of NOT
- Custom query using WP_Query is not working
- Get a list of the last posts grouped by author and filtered by category
- Letting users sort posts
- Sort by name – second wp_query
- How to query post ids liked by the Author
- WordPress Show 4 posts from 4 specific categories in a slider
- Splitting query results, on the frontend, into separate sections based on meta value without multiple loops?
- How WP determines archive page vs single page?
- WordPress DB query