Skip to content

Instantly share code, notes, and snippets.

@EmranAhmed
Last active January 24, 2017 11:38
Show Gist options
  • Save EmranAhmed/fdeb92419485c4510486057ee3b97ab7 to your computer and use it in GitHub Desktop.
Save EmranAhmed/fdeb92419485c4510486057ee3b97ab7 to your computer and use it in GitHub Desktop.
UPB Using Twitter Bootstrap
<?php
if ( ! function_exists( 'your_theme_prefix_upb_grid_system' ) ){
function your_theme_prefix_upb_grid_system( $grid ) {
$grid[ 'name' ] = esc_html__( 'Starter Grid', 'your_theme_textdomain' );
$grid[ 'allGridClass' ] = 'column';
$grid[ 'prefixClass' ] = 'col'; // twb col-md-6
$grid[ 'groupClass' ] = 'row'; // twb row
$grid[ 'groupWrapper' ] = array(
'container-fluid' => esc_html__( 'Fluid Container', 'your_theme_textdomain' ),
'container' => esc_html__( 'Fixed Container', 'your_theme_textdomain' ),
); // twb container
return $grid;
}
}
add_filter( 'upb_grid_system', 'your_theme_prefix_upb_grid_system' );
function your_theme_prefix_upb_theme_support() {
// Supporting customn grid layout
add_theme_support( 'upb-custom-grid-layout' );
}
add_action( 'after_setup_theme', 'your_theme_prefix_upb_theme_support' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment