Exemplo n.º 1
0
function get_slider_or_title()
{
    global $travelify_theme_options_settings;
    $options = $travelify_theme_options_settings;
    if (is_home() || is_front_page()) {
        if ("0" == $options['disable_slider']) {
            if (function_exists('travelify_pass_cycle_parameters')) {
                travelify_pass_cycle_parameters();
            }
            if (function_exists('travelify_featured_post_slider')) {
                travelify_featured_post_slider();
            }
        }
    } else {
        if ('' != travelify_header_title() || function_exists('bcn_display_list')) {
            $postid = get_the_ID();
            if ($postid == '8') {
                if (is_user_logged_in()) {
                    $show_title = "TRUE";
                } else {
                    $show_title = "FALSE";
                }
            } else {
                $show_title = get_post_meta($postid, $key = 'show_title', $single = TRUE);
            }
            if (!is_page_template('templates/template-product-category-page.php') && !is_page_template('templates/template-about-page.php') && $show_title != "FALSE") {
                ?>
        <div class="page-title-wrap">
          <div class="container clearfix">
            <?php 
                if (function_exists('travelify_breadcrumb')) {
                    travelify_breadcrumb();
                }
                ?>
            <h3 class="page-title"><?php 
                echo travelify_header_title();
                ?>
</h3><!-- .page-title -->
          </div>
        </div>
      <?php 
            }
        }
    }
}
/**
 * Shows Header Part Content
 *
 * Shows the site logo, title, description, searchbar, social icons etc.
 */
function travelify_headerdetails()
{
    ?>
	<?php 
    global $travelify_theme_options_settings;
    $options = $travelify_theme_options_settings;
    $elements = array();
    $elements = array($options['social_facebook'], $options['social_twitter'], $options['social_googleplus'], $options['social_linkedin'], $options['social_pinterest'], $options['social_youtube'], $options['social_vimeo'], $options['social_flickr'], $options['social_tumblr'], $options['social_instagram'], $options['social_rss'], $options['social_github']);
    $flag = 0;
    if (!empty($elements)) {
        foreach ($elements as $option) {
            if (!empty($option)) {
                $flag = 1;
            } else {
                $flag = 0;
            }
            if (1 == $flag) {
                break;
            }
        }
    }
    ?>

	<div class="container clearfix">
		<div class="hgroup-wrap clearfix">
					<section class="hgroup-right">
						<?php 
    travelify_socialnetworks($flag);
    ?>
					</section><!-- .hgroup-right -->
				<hgroup id="site-logo" class="clearfix">
					<?php 
    if ($options['header_show'] != 'disable-both' && $options['header_show'] == 'header-text') {
        ?>
							<h1 id="site-title">
								<a href="<?php 
        echo esc_url(home_url('/'));
        ?>
" title="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
" rel="home">
									<?php 
        bloginfo('name');
        ?>
								</a>
							</h1>
							<h2 id="site-description"><?php 
        bloginfo('description');
        ?>
</h2>
						<?php 
    } elseif ($options['header_show'] != 'disable-both' && $options['header_show'] == 'header-logo') {
        ?>
							<h1 id="site-title">
								<a href="<?php 
        echo esc_url(home_url('/'));
        ?>
" title="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
" rel="home">
									<img src="<?php 
        echo $options['header_logo'];
        ?>
" alt="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
">
								</a>
							</h1>
						<?php 
    }
    ?>

				</hgroup><!-- #site-logo -->

		</div><!-- .hgroup-wrap -->
	</div><!-- .container -->
	<?php 
    $header_image = get_header_image();
    if (!empty($header_image)) {
        ?>
				<img src="<?php 
        echo esc_url($header_image);
        ?>
" class="header-image" width="<?php 
        echo get_custom_header()->width;
        ?>
" height="<?php 
        echo get_custom_header()->height;
        ?>
" alt="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
">
			<?php 
    }
    ?>
	<?php 
    if (has_nav_menu('primary')) {
        $args = array('theme_location' => 'primary', 'container' => '', 'items_wrap' => '<ul class="root">%3$s</ul>');
        echo '<nav id="main-nav" class="clearfix">
					<div class="container clearfix">';
        wp_nav_menu($args);
        echo '</div><!-- .container -->
					</nav><!-- #main-nav -->';
    } else {
        echo '<nav id="main-nav" class="clearfix">
					<div class="container clearfix">';
        wp_page_menu(array('menu_class' => 'root'));
        echo '</div><!-- .container -->
					</nav><!-- #main-nav -->';
    }
    ?>
		<?php 
    if (is_home() || is_front_page()) {
        if ("0" == $options['disable_slider']) {
            if (function_exists('travelify_pass_cycle_parameters')) {
                travelify_pass_cycle_parameters();
            }
            if (function_exists('travelify_featured_post_slider')) {
                travelify_featured_post_slider();
            }
        }
    } else {
        if ('' != travelify_header_title() || function_exists('bcn_display_list')) {
            ?>
			<div class="page-title-wrap">
	    		<div class="container clearfix">
	    			<?php 
            if (function_exists('travelify_breadcrumb')) {
                travelify_breadcrumb();
            }
            ?>
				   <h3 class="page-title"><?php 
            echo travelify_header_title();
            ?>
</h3><!-- .page-title -->
				</div>
	    	</div>
	   <?php 
        }
    }
}
Exemplo n.º 3
0
/**
 * Shows Header Part Content
 *
 * Shows the site logo, title, description, searchbar, social icons etc.
 */
function travelify_headerdetails()
{
    ?>
    <?php 
    global $travelify_theme_options_settings;
    $options = $travelify_theme_options_settings;
    $elements = array();
    $elements = array($options['social_facebook'], $options['social_twitter'], $options['social_googleplus'], $options['social_linkedin'], $options['social_pinterest'], $options['social_youtube'], $options['social_vimeo'], $options['social_flickr'], $options['social_tumblr'], $options['social_instagram'], $options['social_rss'], $options['social_github']);
    $flag = 0;
    if (!empty($elements)) {
        foreach ($elements as $option) {
            if (!empty($option)) {
                $flag = 1;
            } else {
                $flag = 0;
            }
            if (1 == $flag) {
                break;
            }
        }
    }
    ?>

    <div class="container clearfix">
        <div class="hgroup-wrap clearfix">
            <hgroup id="site-logo" class="clearfix">
                <?php 
    if ($options['header_show'] != 'disable-both' && $options['header_show'] == 'header-text') {
        ?>
                    <h1 id="site-title">
                        <a href="<?php 
        echo esc_url(home_url('/'));
        ?>
" title="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
" rel="home">
                            <?php 
        bloginfo('name');
        ?>
                        </a>
                    </h1>
                    <h2 id="site-description"><?php 
        bloginfo('description');
        ?>
</h2>
                <?php 
    } elseif ($options['header_show'] != 'disable-both' && $options['header_show'] == 'header-logo') {
        ?>
                    <h1 id="site-title">
                        <a href="<?php 
        echo esc_url(home_url('/'));
        ?>
" title="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
" rel="home">
                            <img src="<?php 
        echo $options['header_logo'];
        ?>
" alt="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
">
                        </a>
                    </h1>
                <?php 
    }
    ?>
            </hgroup><!-- #site-logo -->
            <section class="hgroup-right-header_upper">
                <?php 
    $defaults = array('menu' => '77', 'container' => 'div', 'container_class' => 'header_upper', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 'echo' => true);
    wp_nav_menu($defaults);
    ?>
                <?php 
    $checkout_page_url = get_permalink(woocommerce_get_page_id('checkout'));
    ?>
                <!--
                <ul class="cart-contents">
                    <li>
                        <a class="color-red" href="<?php 
    echo WC()->cart->get_cart_url();
    ?>
" title="<?php 
    _e('View your shopping cart');
    ?>
">
                            CART(<?php 
    echo sprintf(_n('%d <span class="cart1">item</span>', '%d <span class="cart1">items', WC()->cart->cart_contents_count), WC()->cart->cart_contents_count);
    ?>
 <span class="cart1">-</span> <?php 
    echo WC()->cart->get_cart_total() . "</span>";
    ?>
)
                        </a>
                    </li>
                    <li>&nbsp;|&nbsp;</li>
                    <li>
                        <a href="<?php 
    echo $checkout_page_url;
    ?>
" title="<?php 
    _e('Proceed to Checkout');
    ?>
">
                            CHECKOUT >
                        </a>
                    </li>
                </ul>
                -->
            </section>
            <section class="hgroup-right">
                <?php 
    travelify_socialnetworks($flag);
    ?>
                <?php 
    get_search_form();
    ?>
            </section><!-- .hgroup-right -->

            <?php 
    if (is_active_sidebar('travelify_header_highlighted_widget')) {
        ?>
                <section class="hgroup-header-highlighted-widget">
                    <?php 
        dynamic_sidebar('travelify_header_highlighted_widget');
        ?>
                </section>
            <?php 
    }
    ?>

            <section class="hgroup-right-header_bottom">
                <?php 
    $defaults = array('menu' => '78', 'container' => 'div', 'container_class' => 'header_bottom', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 'echo' => true);
    wp_nav_menu($defaults);
    ?>
            </section>
        </div><!-- .hgroup-wrap -->
    </div><!-- .container -->
    <?php 
    $header_image = get_header_image();
    if (!empty($header_image)) {
        ?>
        <img src="<?php 
        echo esc_url($header_image);
        ?>
" class="header-image" width="<?php 
        echo get_custom_header()->width;
        ?>
" height="<?php 
        echo get_custom_header()->height;
        ?>
" alt="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
">
    <?php 
    }
    ?>
    <?php 
    if (has_nav_menu('primary')) {
        $args = array('theme_location' => 'primary', 'container' => '', 'items_wrap' => '<ul class="root">%3$s</ul>');
        echo '<nav id="main-nav" class="clearfix">
					<div class="container clearfix">';
        wp_nav_menu($args);
        echo '</div><!-- .container -->
					</nav><!-- #main-nav -->
					<div class="mobile-menu"></div>
					';
    } else {
        echo '<nav id="main-nav" class="clearfix">
					<div class="container clearfix">';
        wp_page_menu(array('menu_class' => 'root'));
        echo '</div><!-- .container -->
					</nav><!-- #main-nav -->
					<div class="mobile-menu"></div>
					';
    }
    ?>
    <?php 
    if (is_home() || is_front_page()) {
        if ("0" == $options['disable_slider']) {
            if (function_exists('travelify_pass_cycle_parameters')) {
                travelify_pass_cycle_parameters();
            }
            if (function_exists('travelify_featured_post_slider')) {
                travelify_featured_post_slider();
            }
        }
    } else {
        if ('' != travelify_header_title() || function_exists('bcn_display_list')) {
            $postid = get_the_ID();
            if ($postid == '8') {
                if (is_user_logged_in()) {
                    $show_title = "TRUE";
                } else {
                    $show_title = "FALSE";
                }
            } else {
                $show_title = get_post_meta($postid, $key = 'show_title', $single = TRUE);
            }
            if (!is_page_template('templates/template-product-category-page.php') && !is_page_template('templates/template-about-page.php') && $show_title != "FALSE") {
                ?>
                <div class="page-title-wrap">
                    <div class="container clearfix">
                        <?php 
                if (function_exists('travelify_breadcrumb')) {
                    travelify_breadcrumb();
                }
                ?>
                        <h3 class="page-title"><?php 
                echo travelify_header_title();
                ?>
</h3><!-- .page-title -->
                    </div>
                </div>
            <?php 
            }
        }
    }
}