Digging myself deeper in documentation, I got the following result.
There is a way to group your custom blocks around a given category in Gutenberg, and therefore we have the method block_categories_all
. So with a filter, you can extend the default categories with custom ones.
Here is my example:
add_filter( 'block_categories_all', function( $categories, $post ) {
return array_merge(
$categories,
array(
array(
'slug' => 'my-slug',
'title' => 'my-title',
),
)
);
}, 10, 2 );
You can find more on this in the provided API.
Related Posts:
- How would I get a taxonomy/category list inside a Gutenberg block?
- WordPress Multiple Category Search
- How to remove categories filter from wordpress admin?
- Activate Gutenberg in category-descriptions
- Decreasing the Memory Consumption of a WordPress Site?
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Category Archive
- How can I select a primary category?
- how to use a different domain/subdomain for authors/catagories on single site?
- Deleting default category in wordpress
- Delete a specific category when deleting a user
- How to list child categories in custom category template?
- How to set up sub-categories for author pages?
- View category in the preview of Theme Customizer
- One WordPress Install, Two Categories. Each Category Gets a Domain
- How to have a static category/author page?
- Create single.php for specific category by category id
- Save metabox checkboxes values to custom content type
- Select category in custom query
- Remove “Parent” Selection When Adding/Editing Categories?
- Order Taxonomy Term by date created
- Get term by slug in Gutenberg
- Hide post meta data on a specific category
- Format Brand value in Category view [closed]
- How to show in search results posts with a particular tag in a particular category?
- What is the advantage of using header-catname.php over is_category(‘catname’);?
- Remove ‘rel’ attributes from the_category() output
- Multiple menu items highlighted
- How can I enable a TINYMCE rich text editor in the admin interface?
- in_category() works in single.php but not in page.php?
- Use a wordpress page to display a certain category
- How to view WordPress’ default category IDs?
- Category-slug.php not being used
- How would I go about adding custom header images per category?
- Automatically exclude categories from metabox based on title
- Display posts separated by Category in Author’s page
- New Categories Not Shown In the Post Edit Page
- How to display post categories within the Latest Posts block?
- How to categorize posts under Category 1 and Category 2 which are separate lists of categories, and display them as separate lists in widgets
- How to organize custom categories for filtering and selecting
- Filtering *out* a taxonomy from the admin post list
- How to rewrite the post URL according to the category?
- How to build a simple nav system of custom post type categories and its posts?
- Display thumbnails for certain category posts
- Keyword search in multiple categories
- Is it possible to remove from default category widget?
- How to customize my category pages
- How to make the ‘delete’ button inactive on some categories?
- Two columns in homepage each with one category
- Multiple selection for wordpress widget
- how to nest specific category thumbnails inside different containers
- Wrong category nice name is displayed on archive page
- How can i change what one category displays?
- Two Sections on Woocommerce Catergory Page [closed]
- How to let the user create a selection of categories via the backend
- Theme for subcategories
- Add code to header based on category for specific posts?
- Custom css per category and per single post belong in each category
- How to hide widget from certain category
- custom query for both category and pages using global $wpdb;
- How to add icon over specific thumb
- Problem with Custom Post Type Categories
- List post only under the category, exclude child category content
- SQL query to get posts from multiple categories but not in a category
- wp_delete_term or wp_delete_category?
- Select posts that match multiple category names, must match all categories listed
- Custom Portfolio Page
- Last x Posted Categories?
- I need advice on how to structure the categories according to the layout i have
- show only sub categories if available?
- How to add meta description, keywords, custom title to a category template
- separate posts to have (kind of) 2 blogs?
- Intermittent Gutenberg 504 Gateway Timeout when calling REST route to retrieve categories
- How to exclude certain categories showing in Gutenberg?
- Problem with pagination block in Gutenberg
- Is it possible to edit a wordpress category with Gutenberg?
- Hide Some Categories in Post Editor
- Exclude a category from block editor’s category widget
- Only 10 of 233 categories selectable when adding a new post
- How can I make a category function as a page?
- Category custom template is not showing correct posts
- Search Replace Database ONLY for posts of certain category?
- Default URL for category dropdown select option
- Need help to structure our a complex hierarchy
- Inserting categories as a hierarchical terms from frontend form
- Show posts from all categories
- How to add a post with new Taxonomy without assigning to default category?
- Getting page/category content to show up in my custom page template
- How do you add Author and date Published on Category Pages?
- Removing categories, Comments etc from posts?
- Own Custom Tags/Category page ( posts)
- Gettind 404 not found wen click the view button for a given category custom post type portfolio
- How to create default categories in new installs?
- display certain category on custom template page
- List all authors by matching custom meta data on a category page
- Custom Fields to Category edit page, then displaying them in a template correctly
- why is the delete option missing from just one category?
- How to prevent page re-sizing for mobile browsers [closed]
- Custom permalinks structure
- Woocommerce custom taxonomy order
- How to link ACF relationship field to the new Query block in Full Site Editing