Custom Block Library Categories

Davor Mlinarić
24 Sep 2022

This code will add additional categories into oxygen block library

add_action('plugins_loaded', 'oxygen_custom_block_categories');

function oxygen_custom_block_categories() {
    global $ct_component_categories;
	$newcategories =  array('Seperators','Crazy stuff','Awesomes');
	$ct_component_categories = array_merge($ct_component_categories, $newcategories);
	sort($ct_component_categories); // sort by name

Was this article helpful?



Never miss new post again

Subscribe and get list of new posts in your inbox

Click to Copy