'; register_block_pattern( 'the-mx-patterns/header-title-menu-search', array( 'title' => esc_html__( 'Header- Title, Menu, Search Bar', 'the-m-x' ), 'content' => trim( $content_header1 ), 'categories' => array( 'header', 'the-m-x' ), 'viewportWidth' => 1280, ) ); $content_header5 = '
'; register_block_pattern( 'the-mx-patterns/header-lightbg-title-menu-search', array( 'title' => esc_html__( 'Header (Light Background)- Title, Menu, Search Bar', 'the-m-x' ), 'content' => trim( $content_header5 ), 'categories' => array( 'header', 'the-m-x' ), 'viewportWidth' => 1280, ) ); $content_header2 = '
'; register_block_pattern( 'the-mx-patterns/header-logo-menu-social', array( 'title' => esc_html__( 'Header- Logo, Menu, Social Badges', 'the-m-x' ), 'content' => trim( $content_header2 ), 'categories' => array( 'header', 'the-m-x' ), 'viewportWidth' => 1280, ) ); $content_header3 = '
'; register_block_pattern( 'the-mx-patterns/header-logo-menu-search', array( 'title' => esc_html__( 'Header- Logo, Menu, Search Bar', 'the-m-x' ), 'content' => trim( $content_header3 ), 'categories' => array( 'header', 'the-m-x' ), 'viewportWidth' => 1280, ) ); $content_header4 = '
'; register_block_pattern( 'the-mx-patterns/header-logo-menu', array( 'title' => esc_html__( 'Header- Logo, Menu', 'the-m-x' ), 'content' => trim( $content_header4 ), 'categories' => array( 'header', 'the-m-x' ), 'viewportWidth' => 1280, ) ); $content_hero1 = '

A Headline

'; register_block_pattern( 'the-mx-patterns/hero-menu', array( 'title' => esc_html__( 'Header- Hero Image, Menu', 'the-m-x' ), 'content' => trim( $content_hero1 ), 'categories' => array( 'header', 'the-m-x' ), 'viewportWidth' => 1280, ) ); $content_hero2 = '

Exclusive Sale at Our Store

50% Off Sale. Invite Only.

'; register_block_pattern( 'the-mx-patterns/hero-cta', array( 'title' => esc_html__( 'Header- Hero Image, Call-to-Action', 'the-m-x' ), 'content' => trim( $content_hero2 ), 'categories' => array( 'header', 'the-m-x' ), 'viewportWidth' => 1280, ) ); } } function the_mx_register_block_pattern_cats() { if( function_exists( 'register_block_pattern_category' ) ) { // Add new block pattern category for this theme. register_block_pattern_category( 'the-m-x', array( 'label' => esc_html__( 'The M.X.', 'the-m-x' ) ) ); } } add_action( 'init', 'the_mx_register_block_patterns' ); add_action( 'init', 'the_mx_register_block_pattern_cats' );