Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Layout options
- $this->sections[] = array(
- 'icon' => 'el-icon-cogs',
- 'title' => __( 'Layout Settings', 'bootville' ),
- 'fields' => array(
- array(
- 'id' => 'sidebar_layout',
- 'type' => 'image_select',
- 'compiler' => true,
- 'title' => __( 'Main Layout', 'bootville' ),
- 'subtitle' => __( 'Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'bootville' ),
- 'options' => array(
- '1' => array(
- 'alt' => '1 Column',
- 'img' => ReduxFramework::$_url . 'assets/img/1col.png'
- ),
- '2' => array(
- 'alt' => '2 Column Left',
- 'img' => ReduxFramework::$_url . 'assets/img/2cl.png',
- ),
- '3' => array(
- 'alt' => '2 Column Right',
- 'img' => ReduxFramework::$_url . 'assets/img/2cr.png',
- )
- ),
- 'default' => '2'
- ),
- )
- ); // end Layout Options
- Basically I want it to use <body <?php body_class(); ?>> if option 1 is selected and use <body <?php body_class('left-sidebar'); ?>> if option 2 is selected. If I just add <div class="<?php echo $pcount; ?>"> it works fine.
- THIS IS THE OPTION ADDED TO THE HEADER -
- <?php
- // Sidebar Layout variable from Theme Options
- $pcount = bvwp_option('sidebar_layout');
- ?>
- <body
- // Option for sidebar body class
- <?php
- if (bvwp_option('sidebar_layout') == '1') {
- body_class();
- if ( $pcount > 2 )
- {
- body_class('right-sidebar');
- }
- }
- ?>>
Advertisement
Add Comment
Please, Sign In to add comment