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:
- 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
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- Wp_redirect and sending variables
- Sanitation needed for WP_Query or get_posts calls?
- how does $wpdb differ to WP_Query?
- WP_Query – filter or directly?
- WP_Query with checkbox meta_query
- How can I save an array from a random post sequence for later use?
- Does WordPress generate an automatic page for post formats?
- Why is WP-Query spelled like it is?
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How to add custom query filters in WP_User_Query
- Limit search results to exact match
- WP_Query hit max joins… How else can I build a search function that uses custom fields?
- Pagination not working Search posts
- Does using a custom query_var create a security hole?
- How to speed up wp_query, took more 5s to run against 100k posts
- How to sort posts in admin by titles with dd.mm.yyyy format?
- Why I can’t get old posts instead of recent with WP_Query?
- How get posts from a subcategory of a category by name?
- Date query not inclusive despite parameter being true
- WP_Query orderby breaks when using AJAX?
- Detect featured image among the attached images
- Exclude old events from WP_Query with date saved in a `meta_key`
- WP_Query arguments to fetch custom post type posts which are in certain category?
- WP_Query loop within WP_Query loop
- current_post not working – give me -1 for every post
- Search Posts with Custom Fields as query
- Use query->set or make new query?
- How to fetch only media that was already attached to a post/page?
- Getting Taxonomy inside WP_Query Loop
- Nested tax_query that allows specified categories OR tags, but NOT other categories
- How to delete taxonomy term when a wordpress user is removed?
- Custom query based on meta key – Reduce three states to two in results?
- How to create a WordPress Post Filter that users can use to filter posts by year?
- Exclude category for main query and custom
- Ajax load more posts – WP_Query parameters not working
- How to display multiple custom fields with the same meta_key in an ascending order?
- Using the_post_thumbnail resets current loop item ID
- Meta_query with multiple keys and multiple values
- WordPress WP_Query make mysql time out
- Get authors by term id or slug
- Assign Json file to WP_Query
- How do I query for posts by partial meta key?
- WP Query to have sticky posts first, with pagination and having a joint ‘posts per page’ arg with main loop
- New WP_Query calls Pre_get_posts filter twice
- Multisite wp_query & switch_to_blog issue
- How to increase load time of an archive/search page (WP_Query)
- Issue with front page navigation after upgrading to 3.4
- Prevent author bio page from showing in search results
- Changing the default wp_search_stopwords
- WP_Query array key / value pairs?
- Get posts from multiple tax terms
- Tax Query only returns for the first of several terms
- WP_Query offset is returning post from prevois loop
- Tax query is not working!
- How To Keep Search Title the same on paged Results
- Does WP_Query ‘responds’ badly to empty arguments?
- Get next/prev image/attachment in time with date query
- Reordering content using a meta value
- How to add a recent post function to a text widget I created for practice?
- Adding query parameter to archive page returns 404
- Optimising WP_Query with ACF Fields
- WordPress AJAX Request returns 400
- Using wpdb prepare with a variable, turns it into a big string
- SQL to join u3g_users & u3g_meta_value with repeating data
- WP_Query no result if keyword contains number
- WP_QUERY order posts by two combined meta_value dates
- Order by value of Custom Field using url string
- update_post_meta performance in a loop woocommerce
- How to set meta_query if get_post_meta returns nested array for that key? [duplicate]
- query_posts() doesn’t seem to be called in my page
- WP_Query returns empty if meta_query has more than 7 values
- query.php – multiple is_category functions
- How to get several fields from wp_query?
- Overwriting auto-appended NOT IN query in WP_Query
- Pagination not working with WP_Query (creates links but no page)
- WP Query posts__in not working with array
- query_posts with sorting on a custom datestamp
- Conditionals in WP_Query
- Query Posts by date range with fixed beginning and end
- query by meta value then date and not empty meta value
- Issue with sorting by post date and custom post type
- Is it possible to use WP Query to orderby custom meta value and custom taxonomy?
- Display all custom meta field values from the database using ACF Repeater
- Can’t get LIKE to work with wp_query [closed]
- How to include custom fields in wordpress search
- Extend search query to search meta keys values based on search string
- AJAX multiple search boxes not merging with array merge