Skip to content

Instantly share code, notes, and snippets.

@contempoinc
Created June 8, 2017 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save contempoinc/9d14a21d0896ef2bb5461a8034cbaa33 to your computer and use it in GitHub Desktop.
Save contempoinc/9d14a21d0896ef2bb5461a8034cbaa33 to your computer and use it in GitHub Desktop.
<?php
/**
* Header Template
*
* @package WP Real Estate 6
* @subpackage Template
*/
// Load Theme Options
global $ct_options;
global $woocommerce;
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" <?php language_attributes(); ?>><![endif]-->
<!--[if IE 7 ]><html class="ie ie7" <?php language_attributes(); ?>><![endif]-->
<!--[if IE 8 ]><html class="ie ie8" <?php language_attributes(); ?>><![endif]-->
<!--[if (gte IE 9)|!(IE)]><html <?php language_attributes(); ?>><![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta name="description" content="<?php bloginfo('description'); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<?php wp_head(); ?>
</head>
<body<?php ct_body_id('top'); ?> <?php body_class(); ?>>
<?php if($ct_options['ct_boxed'] == "Boxed") {
echo '<div class="container main">';
} ?>
<div id="wrapper" <?php if($ct_options['ct_boxed'] == "Boxed") { echo 'class="boxed"'; } ?>>
<div id="masthead-anchor"></div>
<div id="topbar-wrap">
<div class="container">
<p class="marB0 left"><?php bloginfo('description'); ?></p>
<?php if($ct_options['ct_header_social'] == "Yes") {
$facebook = isset( $ct_options['ct_fb_url'] ) ? esc_attr( $ct_options['ct_fb_url'] ) : '';
$twitter = isset( $ct_options['ct_twitter_url'] ) ? esc_attr( $ct_options['ct_twitter_url'] ) : '';
$linkedin = isset( $ct_options['ct_linkedin_url'] ) ? esc_attr( $ct_options['ct_linkedin_url'] ) : '';
$googleplus = isset( $ct_options['ct_googleplus_url'] ) ? esc_attr( $ct_options['ct_googleplus_url'] ) : '';
$dribbble = isset( $ct_options['ct_dribbble_url'] ) ? esc_attr( $ct_options['ct_dribbble_url'] ) : '';
$pinterest = isset( $ct_options['ct_pinterest_url'] ) ? esc_attr( $ct_options['ct_pinterest_url'] ) : '';
$instagram = isset( $ct_options['ct_instagram_url'] ) ? esc_attr( $ct_options['ct_instagram_url'] ) : '';
$github = isset( $ct_options['ct_github_url'] ) ? esc_attr( $ct_options['ct_github_url'] ) : '';
$contact = isset( $ct_options['ct_contact_url'] ) ? esc_attr( $ct_options['ct_contact_url'] ) : '';
$phone = isset( $ct_options['ct_contact_phone_header'] ) ? esc_attr( $ct_options['ct_contact_phone_header'] ) : '';
} ?>
<div class="right">
<ul class="social left">
<?php if($ct_options['ct_enable_front_end'] == 'Yes' && $ct_options['ct_mode'] != "Single Listing") { ?>
<?php if(is_user_logged_in()) { ?>
<li class="submit-listing"><a href="<?php echo home_url(); ?>/?page_id=<?php echo $ct_options['ct_submit']; ?>"><i class="fa fa-plus"></i> <?php _e('Submit Listing', 'contempo'); ?></a></li>
<li class="my-listings"><a href="<?php echo home_url(); ?>/?page_id=<?php echo $ct_options['ct_view']; ?>"><i class="fa fa-th-list"></i> <?php _e('My Listings', 'contempo'); ?></a></li>
<li class="logout"><a href="<?php echo wp_logout_url( home_url() ); ?>"><i class="fa fa-sign-out"></i> <?php _e('Logout', 'contempo'); ?></a></li>
<?php } else { ?>
<li class="login"><a href="<?php echo home_url(); ?>/?page_id=<?php echo $ct_options['ct_login']; ?>"><i class="fa fa-sign-in"></i> <?php _e('Login', 'contempo'); ?></a></li>
<li class="register"><a href="<?php echo home_url(); ?>/?page_id=<?php echo $ct_options['ct_login']; ?>"><i class="fa fa-pencil-square-o"></i> <?php _e('Register', 'contempo'); ?></a></li>
<?php } ?>
<?php } ?>
<?php if($facebook != '') { ?>
<li class="facebook"><a href="<?php echo $facebook; ?>"><i class="fa fa-facebook"></i></a></li>
<?php } ?>
<?php if($twitter != '') { ?>
<li class="twitter"><a href="<?php echo $twitter; ?>"><i class="fa fa-twitter"></i></a></li>
<?php } ?>
<?php if($linkedin != '') { ?>
<li class="linkedin"><a href="<?php echo $linkedin; ?>"><i class="fa fa-linkedin"></i></a></li>
<?php } ?>
<?php if($googleplus != '') { ?>
<li class="google"><a href="<?php echo $googleplus; ?>"><i class="fa fa-google-plus"></i></a></li>
<?php } ?>
<?php if($dribbble != '') { ?>
<li class="dribbble"><a href="<?php echo $dribbble; ?>"><i class="fa fa-dribbble"></i></a></li>
<?php } ?>
<?php if($pinterest != '') { ?>
<li class="pinterest"><a href="<?php echo $pinterest; ?>"><i class="fa fa-pinterest"></i></a></li>
<?php } ?>
<?php if($instagram != '') { ?>
<li class="instagram"><a href="<?php echo $instagram; ?>"><i class="fa fa-instagram"></i></a></li>
<?php } ?>
<?php if($github != '') { ?>
<li class="github"><a href="<?php echo $github; ?>"><i class="fa fa-github"></i></a></li>
<?php } ?>
<?php if($contact != '') { ?>
<li class="contact"><a href="<?php echo $contact; ?>"><i class="fa fa-envelope"></i></a></li>
<?php } ?>
</ul>
<?php
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(is_plugin_active('sitepress-multilingual-cms/sitepress.php')) {
echo '<div class="wpml-lang left">';
ct_language_selector_flags();
echo '</div>';
}
?>
<div class="contact-phone right">
<?php echo __($phone, 'contempo'); ?>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<?php if($ct_options['ct_mode'] != "Single Listing") { ?>
<div id="header-wrap">
<div class="container">
<header id="masthead">
<div class="col span_3">
<?php if($ct_options['ct_text_logo'] == "Yes") { ?>
<div id="logo" class="left">
<h2><a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a></h2>
</div>
<?php } else { ?>
<?php if($ct_options['ct_logo']) { ?>
<a href="<?php echo home_url(); ?>"><img class="logo left" src="<?php echo $ct_options['ct_logo']; ?>" alt="<?php bloginfo('name'); ?>" /></a>
<?php } else { ?>
<a href="<?php echo home_url(); ?>"><img class="logo left" src="<?php echo get_template_directory_uri(); ?>/images/re6-logo.png" alt="WP Pro Real Estate 6, a WordPress theme by Contempo" /></a>
<?php } ?>
<?php } ?>
</div>
<div class="col span_9">
<?php ct_nav(); ?>
</div>
<div class="clear"></div>
</header>
</div>
</div>
<?php } ?>
<section id="main-content">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment