Store display_sidebar in static variable