Create Pre-built Layouts

  • Click on COPY LAYOUT Button from SECTIONS tab.

Copy Layout

  • Create a function which return an associative array like:

function home_layout( $layout ) {

    $template = array(
        'title' => 'Layout Name',
        'desc' => 'Layout Description',
        'template' => 'PASTE COPIED TEMPLATE CODE',
        'preview' => get_theme_file_uri( 'layout-preview/home.png' ) )
        );

    $layout->register( $template );

}
  • Add your function like: home_layout with upb_register_layout Action hook.
function home_layout( $layout ) {

    $template = array(
        'title' => 'Layout Name',
        'desc' => 'Layout Description',
        'template' => 'PASTE COPIED TEMPLATE CODE',
        'preview' => get_theme_file_uri( 'layout-preview/home.png' ) )
        );

    $layout->register( $template );

}

add_action( 'upb_register_layout', 'home_layout' );
  • Put Copied Layout contents as template value.

results matching ""

    No results matching ""