• Resolved peterjrees

    (@peterjrees)


    Hi there, thanks for your great work on this plugin!

    After disabling the default Gutenberg column and button blocks in the Block Manager, I’d now like to move the Bootstrap blocks/icons into the Design category to take their place – is there a way to do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor tschortsch

    (@tschortsch)

    Hi @peterjrees. Sadly this is not possible right now. We’re adding all our blocks to the custom wp-bootstrap-blocks category. The category could probably be overwritten by implementing a filter for the category name for each block on our side (not really sure if this would break something).

    Thread Starter peterjrees

    (@peterjrees)

    Thanks for the reply @tschortsch – would it be possible then to bring the Bootstrap Blocks higher up in the category order?

    I use these blocks frequently in my workflow so it makes sense to have them more easily accessible rather than having to scroll down to the bottom of the sidebar every time.

    Plugin Contributor tschortsch

    (@tschortsch)

    Sorry for the late answer but you should be able to reorder the categories by implementing the following filter:

    function reorder_block_categories( $categories ) {
        $categories_ordered = array();
        foreach ( $categories as $category ) {
            if ( $category['slug'] === 'wp-bootstrap-blocks' ) {
                array_unshift( $categories_ordered, $category );
            } else {
                array_push( $categories_ordered, $category );
            }
        }
        return $categories_ordered;
    }
    add_filter( 'block_categories', 'reorder_block_categories', 10, 1);

    Hope this helps!

    Thread Starter peterjrees

    (@peterjrees)

    That did the trick, thanks @tschortsch!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Move Bootstrap Blocks to Design Category’ is closed to new replies.