<?php global $gp;

if ( $GLOBALS['gp_layout'] == 'gp-left-sidebar' OR $GLOBALS['gp_layout'] == 'gp-right-sidebar' ) { ?>

	<aside id="sidebar">

		<?php if ( ( $GLOBALS['gp_hub_header'] == true OR is_page_template( 'review-template.php' ) ) && ( $GLOBALS['gp_layout'] != 'gp-no-sidebar' OR $GLOBALS['gp_layout'] != 'gp-fullwidth' ) ) { ?>
			<?php if ( $GLOBALS['gp_user_rating_box'] == 'enabled' ) { ?>
				<?php get_template_part( 'lib/sections/user-rating-box' ); ?>
			<?php } ?>
		<?php } ?>

		<?php if ( is_active_sidebar( $GLOBALS['gp_sidebar'] ) ) {
			dynamic_sidebar( $GLOBALS['gp_sidebar'] );
		} ?>		

	</aside>

<?php } ?>