/** * Enqueue scripts and styles. */ function pictorico_scripts() { wp_enqueue_style('pictorico-style', get_stylesheet_uri()); wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.3'); wp_enqueue_style('pictorico-open-sans-condensed'); wp_enqueue_style('pictorico-pt-serif'); wp_enqueue_script('pictorico-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true); wp_enqueue_script('pictorico-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } if (pictorico_has_featured_posts(1)) { wp_enqueue_script('pictorico-slider-script', get_template_directory_uri() . '/js/jquery.flexslider.js', array('jquery')); wp_enqueue_script('pictorico-script', get_template_directory_uri() . '/js/pictorico.js', array('pictorico-slider-script')); } }
?> </a> <?php wp_nav_menu(array('theme_location' => 'primary')); ?> </nav><!-- #site-navigation --> <div class="header-search"> <?php get_search_form(); ?> </div> </div> </header><!-- #masthead --> <?php if (is_home() && pictorico_has_featured_posts(1)) { ?> <?php get_template_part('content', 'featured'); ?> <?php } elseif (get_header_image() && (is_home() || is_archive() || is_search())) { ?> <div class="hentry has-thumbnail"> <div class="entry-header"> <div class="header-image" style="background-image: url(<?php header_image(); ?> )"> <a href="<?php echo esc_url(home_url('/'));
function pictorio_get_header_with_title($title = '') { $title_html = ''; if ($title != '') { $title_html = "<h1 class='entry-title'>" . remove_accents($title) . "</h1>"; } if (is_home() && pictorico_has_featured_posts(1)) { get_template_part('content', 'featured'); } elseif (get_header_image() && (is_home() || is_archive()) || is_404() || is_search()) { ?> <div class="hentry has-thumbnail"> <?php if (is_home() || is_archive()) { ?> <div class="entry-header"> <video class="header-video" autoplay loop> <source src="<?php echo get_bloginfo('template_directory'); ?> /intro2.mp4" type="video/mp4"> <source src="<?php echo get_bloginfo('template_directory'); ?> /intro2.webm" type="video/webm"> <div class="header-image" style="background-image: url(<?php echo pictorio_get_header_image(); ?> ); opacity:0.9"> <a href="<?php echo esc_url(home_url('/')); ?> " rel="home"><span class="screen-reader-text"><?php bloginfo('name'); ?> </span></a> </div> </video> <div class="header-image-fallback" style="background-image: url(<?php echo pictorio_get_header_image(); ?> ); opacity:0.9"> <a href="<?php echo esc_url(home_url('/')); ?> " rel="home"><span class="screen-reader-text"><?php bloginfo('name'); ?> </span></a> </div> <?php echo $title_html; ?> </div> <div class="entry-map" id="map"></div> <script type="text/javascript"> var now = new Date(); var start = new Date('03/30/2016 10:1 AM'); var distance = now - start; var days = Math.floor(distance / (1000 * 60 * 60 * 24)); var messages = [ "<h1 style=\"font-weight:bold;\"><?php echo get_bloginfo(false, 'name'); ?> </h1>", "<h1 style=\"font-weight:bold;\"><?php echo __('A video blog about our journey . . .', 'pictorico'); ?> </h1>", "<h2 style=\"font-weight:bold;\"><?php echo __('. . . from Turkey to Australia and farther', 'pictorico'); ?> </h2>", "<h1 style=\"font-weight:bold;\"><?php echo __('On the road since', 'pictorico'); ?> " + days + " <?php echo __('days', 'pictorico'); ?> </h1>", ]; </script> <div class="entry-text" id="entry-text"></div> <div class="entry-newsletter"> <form action="<?php echo get_theme_mod('mailchimp_subscribe_url', ''); ?> " method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> <input type="email" placeholder="<?php echo __('Get regular news by email', 'pictorico'); ?> " value="" name="EMAIL" class="required email" id="mce-EMAIL" size="25"> <input type="submit" value="<?php echo __('Subscribe', 'pictorico'); ?> " name="subscribe" id="mc-embedded-subscribe" class="button"> </form> </div> </div> <?php } else { ?> <div class="entry-header reduced-title"> <div class="header-image" style="background-image: url(<?php echo pictorio_get_header_image(); ?> )"> <a href="<?php echo esc_url(home_url('/')); ?> " rel="home"><span class="screen-reader-text"><?php bloginfo('name'); ?> </span></a> </div> <?php echo $title_html; ?> </div> <?php } ?> </div><?php } }