'is_front_page' not working

Hi,

I registered a new sidebar in widget.php to display another sidebar.

In template/sidebar.php I have this conditional statement

if (is_page(new-classes’)) {
  dynamic_sidebar(‘sidebar-new’);

} else {
  dynamic_sidebar(‘sidebar-primary’);
}

It shows on front page, ‘is_front_page’ not working in lib/config.php

is_front_page definitely works in the roots_display_sidebar conditionals (it is included and on by default).

There is a missing ’ in your code you posted, not sure we can help without some more info or code to review.

Hi Chris,

Here is the actual sidebar.php code:

if ( is_page(‘security-classes’) ) :
dynamic_sidebar(‘sidebar-security’);

elseif ( is_page(‘safety-classes’) ) :
dynamic_sidebar(‘sidebar-safety’);

elseif ( is_page(‘nra-classes’) ) :
dynamic_sidebar(‘sidebar-nra’);

else:
dynamic_sidebar(‘sidebar-primary’);
endif;