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
- getEntityRecords/useEntityRecords: How to use CPT metadata?
- Custom Block: Adding “Post Type” dropdown to Sidebar Settings
- Why does have_posts() return false when in the wordpress admin, but not on the frontend?
- Post term block variations not generated for custom taxonomies
- Can’t publish custom type posts that don’t support title and editor, instead they’re saved as draft
- Is there a way to get Gutenberg interface on a Custom Post Type without supporting block editor?
- Error function query
- Show post with thumbnails only
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- Limit the Title Length on Custom Post Type Archive Page to a Set Number of Characters
- How to add custom taxonomy in custom post type permalink?
- Custom post type archive with page as parent url
- WP Query post__in not returning correct results
- How to retrieve category of a post in have_post loop?
- how to post default thumbnail if post not created yet
- get_the_post_thumbnail_url(‘full’) returns empty from custom post type
- Add parent post to Custom Post Type [closed]
- Permalink misbehaving in Custom Post Types
- Proper way to display latest 5 posts grouped by post type?
- Show data from one Custom Post Type in another Custom Post Type
- Custom Post Type single.php template only shows the latest post
- How to remove Trash link from custom post type
- Get Post Types in admin
- Can I display custom post types in home.php or need page template?
- Hide if Custom Post Type is empty
- categories should be available across all custom post types
- Why is my WP Query not returning first result’s post meta?
- Show ACF to front end custom post [closed]
- Sort posts in loop by the WooCommerce Membership of the author
- return only the first two terms of custom post
- Check post on publish for blank title
- Post to Top in Array
- Detect inside a custom query the kind of post type to assign custom classes
- Set featured image to archive.php
- Custom post type pages return 404 page?
- single-{post_type}.php not working
- Auto Slug Generation for Custom Post type
- Check if post with same meta value exists
- how to check if custom post title exists or not?
- Filter date from post meta when date is in string format
- Print current post category during WP_Query
- Pros and cons of a custom page vs custom post type template file
- Different Limit number of post on different archive page
- Properly flush rewrite rules on plugin activation
- DIsplaying URL of custom field in last post of certain taxonomy && post type
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- Adding predefined terms to a taxonomy
- Create Custom Post Type as page
- Optimise WP custom post type query
- comment_notification_text filter for custom post type
- How to change “post_class()” for a custom post type?
- To use custom post types, or not to use
- Search one custom post type ONLY, disable “all posts”
- Unable to set featured image
- Autocomplete or suggest from post titles inside plugin