Hi
I have a multilingual site (English, Hebrew)
The hebrew site is RTL so, I wanted the sidebar to be on the left side of the page.
I used this function:
//Sidebar hebrew location
add_filter( 'generate_sidebar_layout','tu_custom_hebrew_sidebar_layout' );
function tu_custom_hebrew_sidebar_layout( $layout )
{
$currentlang = get_bloginfo('language');
if ( is_page( array( '320','237') )|| is_category() ) {
return false;
}
if ( $currentlang=="he-IL" && !is_front_page() )
return 'left-sidebar';
// Or else, set the regular layout
return $layout;
}
The problem is that this function over-rides the settings on a per-page basis, which means I cannot remove the sidebar with the GP UI, only if I remove it via the function.
Question is:
1. Am I using this function correctly?
2. Is there a better way to move the sidebar to the left on RTL pages and still have the GP over-ride functionality.
Thanks in advance,
Dan