Variable global for the sidebar

Hi,
I want to display my sidebar for the different page, left to right and right to left.

The best way for that is with
.pull-right and .pull-left on “.main”

But my variable it was undefined.

main <br />
<b>Notice</b>:  Undefined variable: redux in <b>/Applications/MAMP/htdocs/wp/wp-content/themes/roots/lib/config.php</b> on line <b>43</b><br />
col-sm-8 oooooo

My variable was calling on the function file line 1 :smile:

require_once ('ReduxFramework/ReduxCore/config.php'); // frameworkRedux

And I calls $redux[‘layout_blog_single’] here

 40 function roots_main_class() {
 41 
 42 global $xav_roots_layout_single;
 43 $xav_roots_layout_single = $redux['layout_blog_single'];
 44   echo $xav_roots_layout_single;
 45   if (roots_display_sidebar()) {
 46     // Classes on pages with the sidebar
 47     $class = 'col-sm-8 oooooo';
 48   } else {
 49     // Classes on full width pages
 50     $class = 'col-sm-12';
 51   }
 52 
 53   return $class;
 54 }

Thanks

There isn’t much information to go on here and it’s not Roots related at all. We can’t help debug a custom framework that you’re using especially since we don’t have any of the code.

I agree, I use different way for fixed this problem with the FrameworkRedux.
Thanks !

Hi Xav. Would you mind sharing what you did exactly to get this working with Redux? Did you change the roots_main_class function?

Hi Skylab,
I’m just use to use this variable:

$_SESSION['redux'] = $redux;

Thanks