wp.data.select('core').getPostTypes()
will show return an array of objects that represent each registered post type that is available via the REST API.
wp.apiFetch({path:'wp/v2/posts'}).then( res => console.log( res ) );
will retrieve the latest posts. You may want/need to update the parameters to suit your needs. See the docs for more details
Related Posts:
- Enable Gutenberg on custom post type
- Creating conditional blocks for WordPress Gutenberg
- Add class to Gutenberg Editor for Custom Post Types
- How to filter by custom post type on Gutenberg “Latest Posts’ block
- Gutenberg: Sidebar for specific post type
- Gutenberg how to make attribute to save to meta
- How to add button to post page WordPress 5.x
- WordPress Gutenberg-Block with ESNext (withState, withSelect)
- The editor has encountered an unexpected error. // TypeError: Cannot read property ‘prefix’ of null
- Display different gutenberg template from selected post attributes
- WordPress Rest API only returns content when posttype has editor capability
- Lock post meta block at the bottom of a custom post type
- Gutenberg Featured-Image-panel missing when user with custom role edits Custom Post Type
- Adding a Gutenberg-like custom field on a custom post type
- Classic editor showing in Gutenberg when creating a custom post type
- Creating template with h3 block (block editor)
- How To Enable Block Editor (Gutenberg) for Existing Post Type via functions.php
- How to make a custom taxonomy selectable in post publish area?
- show_in_rest false disable Gutenberg
- I can’t choose the custom taxonomy in my custom post type on Gutenberg
- Parent field missing from custom post type in the block editor
- How to get the parent of a non-hierarchical custom post type being edited in Gutenberg
- post_type_link not working in gutenberg
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Getting meta in editor plugin, and event triggering issue
- Save the post parent in a custom post type in Gutenberg
- WordPress CPT save metadata in gutenberg
- Can I override a CPT template on a per post basis with Gutenberg block editor?
- Query Post Object in WP Admin
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- Combine multiple getEntityRecords calls
- Custom post type editor uses old tinyMCE
- Use core block functionality in a custom block gutenberg
- gutenberg message
- How do I assign a block template (.html) to a custom post type?
- Custom post type set default template using block editor
- CPT: Enable Gutenberg, but disable editor field
- Select custom post type do display from page editor
- How add Filter by Tags and by categories to custom post type in Gutenberg block
- Is it possible to add the Gutenberg block editor to a custom taxonomy?
- How to debug failing updates for custom post type?
- Some posts not displaying by taxonomy term
- Can you programme the selected page template to display block patterns automatically?
- Possible to limit internal link search to post types with Gutenberg editor?
- Custom Gutenberg block problem – This block has encountered an error and cannot be previewed
- How to Add Tags to Custom Post Type?
- How come Featured Image isn’t showing up in my Custom Post Type?
- Adding ‘menu order’ column to custom post type admin screen
- Display custom post type and custom fields within a Bootstrap Carousel
- Archive page…limiting posts per page
- Seperating Custom Post Search Results
- WP 3.1 – archive pages for custom content types possible now without a plugin?
- Use WP_Query object inside a function
- WP_Query search custom posts meta date fields
- Custom permalinks – post type – hierarchical taxonomy’s
- How do I create new content pages for my Custom Post Type?
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- Taxonomy list. Order by a specific custom post type count
- Rewrite CPT slug with two taxonomy slug instead of one
- Creating a simple pagination for custom post type templates
- Custom content type meta_box_cb does not run
- WP_Query tax_query on ACF post_object
- Custom Post Type Alerts
- Custom Post Type Metabox – Not Saving
- WordPress Orderby Numeric Value Not Working
- Replace title column in post list with post meta value
- Multiple Loops On Custom Post Type Template?
- Custom post type and custom taxonomy with the same slug using the file page taxonomy only as directory
- list archives per post types
- Migrating a taxonomy’s tags to the native category
- Make custom post types and pages place nice, re: rewrite
- PHP question: how to combine syntax?
- Why do I have to press the “Update” button twice to save my meta box values?
- How to create connection among state, city, store and store number based on URL
- filter by custom taxonomy using ajax
- How to get the current category with custom posts
- Modify Posts from Custom_Post_Type within the plugin
- Importing JSON feed giving Notice: Array to string conversion error
- Page listing all categories for CPT
- Change permalink for custom_post_type using custom_post_meta (woocommerce)
- How do I “trash” a custom post type post while logged in as Admin
- Pagenavi Plugin and Custom Post Type – Multipage results
- Easy-Post-Type is visible in search, but 404 when clicked
- custom filtering admin columns
- How to display custom taxonomy term specific post?
- Remove Header and style.css from Specific Post template
- WordPress post not executing shortcode until updated
- Custom Post Type
- Force WordPress to only match URL in category
- Can I create a taxonomy term that mirrors the name of a new custom post?
- Ads below footer
- Rewrite for custom type and custom taxonomy
- Query child posts on parents single.php?
- Show custom post along with default post
- Template with Custom Post Type (Custom Tables) does not work
- Ordering custom posts
- Custom post type – update_meta not working
- Where do I insert to? [closed]
- WooCommerce – Complete Order when an action occurs
- How to debug a 404 error on pages whose content is perfectly displayed when I explore it?