HEX
Server: Apache
System: Linux web204c0.megawebservers.com 5.14.0-570.37.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 28 10:41:06 UTC 2025 x86_64
User: absolutespace.ca (53202)
PHP: 7.4.33
Disabled: apache_get_modules,apache_get_version,disk_free_space,phpinfo,exec,shell_exec,passthru,system,proc_nice
Upload Files
File: /services/webpages/a/b/absolutespace.ca/public/wp-content/themes/construction/sidebar.php
<?php
/**
 * The sidebar containing the main widget area.
 *
 * @package WPCharming
 */
?>
<div id="secondary" class="widget-area sidebar" role="complementary">
	<?php
		global $post;
		global $woocommerce;
		$post_type = get_post_type($post);

		if ( is_page() || is_front_page() ) {

			if ( is_active_sidebar( 'sidebar-2' ) ) {
				dynamic_sidebar('sidebar-2');
			} else {
				dynamic_sidebar('sidebar-1');
			}
			
		} elseif ( ( is_single() || is_archive() ) && ( $post_type == 'post' )  ) {
			dynamic_sidebar('sidebar-1');
		} elseif ( ( is_single() || is_archive() ) && ( $post_type == 'portfolio' )  ) {
			dynamic_sidebar('sidebar-1');
		} elseif ( is_search() ) {
			dynamic_sidebar('sidebar-1');
		} elseif ( $woocommerce && is_shop() || $woocommerce && is_product() || $woocommerce && is_product_category() || $woocommerce && is_product_tag() ) {
			dynamic_sidebar('sidebar-woo');
		} else {
			dynamic_sidebar('sidebar-1');
		}
	?>
</div><!-- #secondary -->