Hi
I am creating a dual language site. English – LTR, Hebrew – RTL.
In all the Hebrew pages I would like the sidebar to be on the left, except for some pages with no sidebar at all. (Homepage, Contact page)
So I utlized this filter:
add_filter( 'generate_sidebar_layout','tu_custom_hebrew_sidebar_layout' );
function tu_custom_hebrew_sidebar_layout( $layout )
{
$currentlang = get_bloginfo('language');
if ( $currentlang=="he-IL" && !is_front_page() )
return 'left-sidebar';
// Or else, set the regular layout
return $layout;
}
The problem is, that it actually overrides the settings of the layout per page (Layout > Sidebars) and adds the sidebar on the left even for pages that I would like to be full-width.
For the homepage, I solved it with the conditional.
I would prefer to have an option to override this with the per page setting – is that doable.
If not, how would I add more pages to omit from having the sidebar on the left?
Thanks,
Dan