stuart-d
4/19/2016 - 1:53 PM

Forthecause theme All In One Event Calander archive integration

Forthecause theme All In One Event Calander archive integration

function woo_display_top_section() {

	global $woo_options, $post;

	//Setup default variables, overriding them if the "Theme Options" have been saved.
	$settings = array(
					'header_search' => 'true',
					);
	$settings = woo_get_dynamic_values( $settings );

	$title = '';

	if ( is_category() ) {
		$title = __('Archive', 'woothemes') . ' | ' . single_cat_title( '', false );
	} elseif ( is_day() ) {
		$title = __('Archive', 'woothemes') . ' | ' . get_the_time( get_option( 'date_format' ) );
	} elseif ( is_month() ) {
		$title = __('Archive', 'woothemes') . ' | ' . get_the_time( 'F, Y');
	} elseif ( is_year() ) {
		$title = __('Archive', 'woothemes') . ' | ' . get_the_time( 'Y' );
	} elseif ( is_author() ) {
		$title = __('Archive by Author', 'woothemes');
	} elseif ( is_tag() ) {
		$title = __('Tag Archives', 'woothemes') . ' | ' . single_tag_title( '', false );
	} elseif ( is_search() ) {
		$title = __('Search Results', 'woothemes');
	} elseif ( is_single() && get_post_type( $post->ID ) == "post" ) {
		$title = __('Blog', 'woothemes');
	} elseif ( is_single() && get_post_type( $post->ID ) == "ignition_product" ) {
		$title = __('Projects', 'woothemes');
	} elseif ( is_single() && get_post_type( $post->ID ) == "ai1ec_event" ) {
		$title = __('Event', 'woothemes');
	} elseif ( is_single() && get_post_type( $post->ID ) != "post" ) {
		$title = ucfirst( get_post_type( $post->ID ) );
	} elseif ( is_post_type_archive() ) {
		$title = __('Archive ', 'woothemes') . ' | ' . post_type_archive_title('', false);
	} elseif ( is_page() ) {
		$title = get_the_title();
	}

	if ( is_woocommerce_activated() ) {
		if ( is_product() || is_shop() || is_product_category() || is_product_tag() ) {
			$title = apply_filters( 'woo_change_shop_text',  __( 'Shop', 'woothemes' ) );
		}
	}

?>
	<?php if ( !is_home() ) { ?>
		<section id="top-section">
				<div class="col-full">
					<div class="section-wrapper">
						<header>
							<h1><?php echo $title; ?></h1>
						</header>
						<?php
						if ( is_page_template('template-contact.php') ) {
							if ( isset( $woo_options['woo_contact_subscribe_and_connect'] ) && 'true' == $woo_options['woo_contact_subscribe_and_connect'] ) {
				    			woo_display_social_icons();
					   		}
						} elseif ( isset( $woo_options['woo_header_search'] ) && $woo_options['woo_header_search'] == 'true' ) {
							if ( is_woocommerce_activated() && ( is_product() || is_shop() || is_product_category() || is_product_tag() ) ) {
								the_widget('WC_Widget_Product_Search', 'title=' );
							} else {
								the_widget( 'WP_Widget_Search' );
							}
						}
						?>
					</div>
				</div><!--/.col-full -->
		</section><!--/#top-section -->
	<?php } ?>
<?php
} // End woo_display_top_section()