Restrict WordPress blocks by post type
When building custom blocks for the WordPress editor, sometimes we want to make them only available on specific post types.
When building custom blocks for the WordPress editor, sometimes we want to make them only available on specific post types.
The WordPress block editor supports a link picker that we can add to our custom blocks. The best bit is we can restrict its searches to a post type of our choosing.