<?php
+require_once 'lib/menu-walker.php';
+require_once 'lib/navigation.php';
-$ancestorId = null;
-$includePages = array();
-$frontPageId = get_option('page_on_front');
-add_action('widgets_init', 'glm_quicksite_widget_init');
-
-if (!function_exists('glm_quicksite_widget_init')) {
-
- function glm_quicksite_widget_init()
- {
- register_sidebar(array(
- 'name' => __('Right Sidebar'),
- 'id' => 'sidebar-r',
- 'description' => __('Appears in Right Sidebar')
- ));
- //register_sidebar(array(
- // 'name' => __('Footer'),
- // 'id' => 'sidebar-f',
- // 'description' => __('Appears in Footer Area')
- //));
- }
-
-}
-
-/**
- * get_menu_options
- *
- * Grab the menu options from the theme.ini file
- */
-function glm_get_menu_options()
-{
- static $menu_options;
- $themeConfig = get_template_directory() . '/theme.ini';
-
- if (!$menu_options && is_file($themeConfig)) {
- $menu_options = parse_ini_file($themeConfig, true);
- }
- return $menu_options;
-}
-
-/**
- * glm_page_menu
- *
- * Grab the top level pages and their sub pages as the main navigation
- */
-function glm_page_menu($parent = 0, $class = '')
-{
- $menuConfig = glm_get_menu_options();
- $frontPageId = get_option('page_on_front');
- $parents = array();
- $args = array(
- 'post_type' => 'page',
- 'parent' => $parent,
- 'number' => '',
- 'exclude' => $frontPageId,
- 'post_status' => 'publish',
- 'sort_order' => 'asc',
- 'sort_column' => 'menu_order'
- );
- if ($parent == 0 && $menuConfig['menu_options']['main_level_pages']) {
- $args['include'] = $menuConfig['menu_options']['main_level_pages'];
- }
- $pages = get_pages($args);
- echo '<ul'.(($class)?' class="'.$class.'"':'').'><!-- begin -->'."\n";
- foreach ($pages as $page) {
- $childs = get_pages('child_of=' . $page->ID);
- if (count($childs) > 0) {
- echo '<li class="has-dropdown">'."\n";
- echo '<a href="'.get_permalink($page->ID).'">'.$page->post_title.'</a>'."\n";
- echo glm_page_menu($page->ID, 'sub-menu dropdown');
- echo '</li>'."\n";
- } else {
- echo '<li><a href="'.get_permalink($page->ID).'">'.$page->post_title.'</a></li>'."\n";
- }
- }
- echo '</ul><!-- end -->'."\n";
-}
-
-register_nav_menus(array(
- 'top-bar' => 'Site Navigation',
-// 'mobile-off-canvas' => 'Mobile',
- 'property-bar' => 'Properties Navigation',
- 'property-mobile' => 'Mobile Property Navigation',
- 'art-bar' => 'Art Gallery Navigation',
- 'bay-bar' => 'Bay View Inn Navitgation',
- 'river-bar' => 'Crooked River Lodge Navigation',
- 'bridge-bar' => 'Drawbridge Bistro Navigation',
- 'perry-bar' => 'Perry Hotel Navigation',
- 'pier-bar' => 'Pier Restaurant Navigation',
- 'boat-bar' => 'Pointer Boat Navigation',
- 'vacation-bar' => 'Vacation Rental Navigation',
- 'weathervane-bar' => 'Weathervane Restaurant Navigation',
- 'about-bar' => 'About Navigation',
-// 'footer' => 'Footer'
-));
-
-if ( ! function_exists( 'feature_top_bar' ) ) {
- function feature_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => '', // adding custom nav class
- 'theme_location' => 'top-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'property_top_bar' ) ) {
- function property_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => '', // adding custom nav class
- 'theme_location' => 'property-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'bay_top_bar' ) ) {
- function bay_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'bay-view', // adding custom nav class
- 'theme_location' => 'bay-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'art_top_bar' ) ) {
- function art_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'art-gallery', // adding custom nav class
- 'theme_location' => 'art-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'river_top_bar' ) ) {
- function river_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'crooked-river', // adding custom nav class
- 'theme_location' => 'river-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'bridge_top_bar' ) ) {
- function bridge_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'drawbridge', // adding custom nav class
- 'theme_location' => 'bridge-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'perry_top_bar' ) ) {
- function perry_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'perry-hotel', // adding custom nav class
- 'theme_location' => 'perry-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'pier_top_bar' ) ) {
- function pier_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'pier-restuarant', // adding custom nav class
- 'theme_location' => 'pier-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'boat_top_bar' ) ) {
- function boat_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'pointer-boat', // adding custom nav class
- 'theme_location' => 'boat-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'vacation_top_bar' ) ) {
- function vacation_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'vacation-rental', // adding custom nav class
- 'theme_location' => 'vacation-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'weathervane_top_bar' ) ) {
- function weathervane_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'weathervane', // adding custom nav class
- 'theme_location' => 'weathervane-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-if ( ! function_exists( 'about_top_bar' ) ) {
- function about_top_bar() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'about', // adding custom nav class
- 'theme_location' => 'about-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Top_Bar_Walker()
- ));
- }
-}
-
-if ( ! class_exists( 'Feature_Top_Bar_Walker' ) ) :
-class Feature_Top_Bar_Walker extends Walker_Nav_Menu {
-
- function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
- static $mainLevelCounter;
- if ($depth == 0) {
- ++$mainLevelCounter;
- }
- $element->has_children = ! empty( $children_elements[ $element->ID ] );
- $element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : '';
- $element->classes[] = ( $element->has_children && 1 !== $max_depth ) ? 'has-dropdown' : '';
- $element->classes[] = ( $element->post_parent == 0 && $mainLevelCounter < 3 ) ? '' : 'drop-left';
- parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
- }
-
-// function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
-// $item_html = '';
-// parent::start_el( $item_html, $object, $depth, $args );
-//
-// // Insert style to display page's thumbnail
-// $item_style = '';
-// if ($depth == 0 && has_post_thumbnail((int)$object->object_id)) {
-// $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id((int)$object->object_id), 'bpla-drop-down');
-// //$item_style .= "<style>#menu-item-".$object->ID." > .dropdown:before { background-image: url('".$thumbnail[0]."');</style>";
-// }
-// //$output .= ( 0 == $depth ) ? '<li class="divider"></li>' : '';
-// $classes = empty( $object->classes ) ? array() : (array) $object->classes;
-// if ( in_array( 'label', $classes ) ) {
-// //$output .= '<li class="divider"></li>';
-// $item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '<label>$1</label>', $item_html );
-// }
-// if ( in_array( 'divider', $classes ) ) {
-// $item_html = preg_replace( '/<a[^>]*>( .* )<\/a>/iU', '', $item_html );
-// }
-// if ($item_style) {
-// $output .= $item_style;
-// }
-// if ($depth == 0 && has_post_thumbnail((int)$object->object_id) && $object->has_children) {
-// $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id((int)$object->object_id), 'bpla-drop-down');
-// $item_html .= '<script>var img_for_menu_' . $object->ID . ' = "' . $thumbnail[0] . '";</script>';
-// //$item_html .= '<pre>' . print_r($object, true) . '</pre>';
-// }
-// $output .= $item_html;
-// }
-
- function start_lvl( &$output, $depth = 0, $args = array() ) {
- if ($depth == 0) {
- $output .= "\n<ul class=\"sub-menu dropdown\">\n";
-// $output .= "\n<li class=\"image-placeholder\">";
-// $output .= "</li>\n";
-// $output .= "\n<img src=\"".get_template_directory_uri()."/assets/our-properties-bottom.png\">\n";
-
- }
- }
-
-}
-endif;
/**
* Return the client info option for the given key
*
}
}
-/**
- * glm_offcanvas_menu
- *
- * Generate the list of pages as nested ul li list
- */
-
-if ( ! function_exists( 'feature_mobile_off_canvas' ) ) {
- function feature_mobile_off_canvas() {
- echo '<ul class="left-off-canvas-list">';
- echo '<li class="page_item"><a href="' . get_bloginfo('url') . '">Home</a></li>';
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'off-canvas-list', // adding custom nav class
- 'theme_location' => 'top-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 5, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'items_wrap' => '%3$s',
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- echo '</ul>';
- }
-}
-if ( ! function_exists( 'bay_mobile_off_canvas' ) ) {
- function bay_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'bay-view', // adding custom nav class
- 'theme_location' => 'bay-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'art_mobile_off_canvas' ) ) {
- function art_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'art-gallery', // adding custom nav class
- 'theme_location' => 'art-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'river_mobile_off_canvas' ) ) {
- function river_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'crooked-river', // adding custom nav class
- 'theme_location' => 'river-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'bridge_mobile_off_canvas' ) ) {
- function bridge_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'drawbridge', // adding custom nav class
- 'theme_location' => 'bridge-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'perry_mobile_off_canvas' ) ) {
- function perry_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'perry-hotel', // adding custom nav class
- 'theme_location' => 'perry-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'pier_mobile_off_canvas' ) ) {
- function pier_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'pier-restuarant', // adding custom nav class
- 'theme_location' => 'pier-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'boat_mobile_off_canvas' ) ) {
- function boat_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'pointer-boat', // adding custom nav class
- 'theme_location' => 'boat-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'vacation_mobile_off_canvas' ) ) {
- function vacation_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'vacation-rental', // adding custom nav class
- 'theme_location' => 'vacation-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'weathervane_mobile_off_canvas' ) ) {
- function weathervane_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'weathervane', // adding custom nav class
- 'theme_location' => 'weathervane-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'about_mobile_off_canvas' ) ) {
- function about_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'about', // adding custom nav class
- 'theme_location' => 'about-bar', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! function_exists( 'property_mobile_off_canvas' ) ) {
- function property_mobile_off_canvas() {
- wp_nav_menu(array(
- 'container' => false, // remove nav container
- 'container_class' => '', // class of container
- 'menu' => '', // menu name
- 'menu_class' => 'property-list', // adding custom nav class
- 'theme_location' => 'property-mobile', // where it's located in the theme
- 'before' => '', // before each link <a>
- 'after' => '', // after each link </a>
- 'link_before' => '', // before each link text
- 'link_after' => '', // after each link text
- 'depth' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Feature_Offcanvas_Walker()
- ));
- }
-}
-if ( ! class_exists( 'Feature_Offcanvas_Walker' ) ) :
-class Feature_Offcanvas_Walker extends Walker_Nav_Menu {
-
- function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
- $element->has_children = ! empty( $children_elements[ $element->ID ] );
- $element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : '';
- $element->classes[] = ( $element->has_children && 1 !== $max_depth ) ? 'page_item_has_children' : '';
- $element->classes[] = 'page_item';
-
- parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
- }
-
- function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
- $item_html = '';
- parent::start_el( $item_html, $object, $depth, $args );
-
- $classes = empty( $object->classes ) ? array() : (array) $object->classes;
-
- if ( in_array( 'label', $classes ) ) {
- $item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '<label>$1</label>', $item_html );
- }
-
- $output .= $item_html;
- }
-
- function start_lvl( &$output, $depth = 0, $args = array() ) {
- $output .= "\n<ul class=\"children\">\n";
- }
-
- function end_lvl(&$output, $depth = 0, $args = array()){
- $output .= '</ul>';
- }
-
-}
-endif;
-
add_theme_support('post-thumbnails');
set_post_thumbnail_size(120, 100, true);
/**
true
);
wp_enqueue_script('jquery-ui-datepicker');
- wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
+ wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
if(is_front_page()) {
}
echo '</div>';
echo '</div>';
}
-
-// // The code below is useful when you want the image to resize to
-// if (has_post_thumbnail()) {
-// $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
-// echo '<img src="'.$image_data[0].'" style="no-repeat;max-height:400px;">';
-// } else {
-// echo '<img src="'.get_template_directory_uri().'/assets/default-header.gif" style="max-height:400px;">';
-// }
-// echo '<div class="row">';
-// echo '<div class="small-12 columns">';
-// echo '</div>';
-// echo '</div>';
-
-
-function glm_side_menu() {
- global $post;
- $parents = get_post_ancestors($post->ID);
- $id = ($parents) ? $parents[count($parents)-1]: $post->ID;
- $parent = get_page( $id );
- if ($id == 0) {
- $ID = $post->ID;
- } else {
- $ID = $parent->ID;
- }
- echo '<h1>'.get_the_title($ID).'</h1>';
- echo '<ul class="sidebar"><!-- begin -->'."\n";
- echo wp_list_pages( 'child_of='.$ID.'&title_li=&depth=1&echo=0');
- echo '</ul><!-- end -->'."\n";
-}
-
-
add_action('wp_enqueue_scripts', 'glm_site_scripts');
<?php get_header(); ?>
-<main>
- <div class="row">
- <div id="slideshow">
- <img src="assets/slid-rig.jpg">
- <div class="medium-4 columns show-for-medium-up" id="slide_descrip">
- <p>Img description here.</p>
+<header>
+ <?php get_template_part('parts/top-bar_main');?>
+ <?php get_template_part('parts/off-canvas_main');?>
+ <?php get_template_part('parts/head-image');?>
+</header>
+ <main class="page-inside">
+ <div id="content-wrapper">
+ <div class="row">
+ <?php
+ get_template_part('parts/bread-crumbs');
+ ?>
</div>
- </div>
- </div>
- <div id="content-wrapper">
- <div class="row">
- <div class="small-12 columns text-center Emer">
- <h1>If this is an emergency, please call 9-1-1</h1>
+ <div class="row">
+ <div id="main-content" class="small-12 medium-8 columns">
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <?php the_content();?>
+ <?php endwhile; else:?>
+ <p><?php _e('Sorry, no posts yet');?></p>
+ <?php endif;?>
+ </div>
+ <div class="small-12 medium-4 medium-offset-0 large-offset-1 large-3 columns small-text-left">
+ <div class="sidebar">
+ <h2>Central Reservations</h2>
+ <h3>800-737-1899</h3>
+ <h2>Email</h2>
+ <a href="mailto:hospitality@staffords.com">hospitality@staffords.com</a>
+ <h2>Stafford's Hospitality</h2>
+ <p>PO Box 657<br>Petoskey, Michigan 49770</p>
+ <ul>
+ <li><a class="facebook" target="_blank" href="https://www.facebook.com/staffordshospitality"></a></li>
+ <li><a class="tweet" target="_blank" href="https://twitter.com/petoskeylodging"></a></li>
+ <li><a class="pin" target="_blank" href="https://www.pinterest.com/staffordsnmich/"></a></li>
+ <li><a class="youtube" target="_blank" href="https://www.youtube.com/user/staffordsnmichigan"></a></li>
+ </ul>
+ </div>
+ </div>
</div>
- </div>
- <div class="row">
- <div class="small-12 large-4 columns small-text-center large-text-left blocks">
- <img src="assets/licensed.jpg">
- <h1>State Licensed</h1>
- <p>Just 74 days after the Emmet County Board of Commissioners gave their approval for the County to assume EMS services, the state has put its stamp of approval on the operations as well.</p><a href="#">Read More...</a>
- </div>
- <div class="small-12 large-4 columns small-text-center large-text-left blocks">
- <img src="assets/m-119.jpg">
- <h1>New M-119 Location</h1>
- <p>Emmet County continues to move forward on its new facility to house the ambulances and related equipment currently being constructed on M-119, near Pleasantview Road.</p><a href="#">Read More...</a>
- </div>
- <div class="small-12 large-4 columns small-text-center large-text-left blocks">
- <img src="assets/rig.jpg">
- <h1>New Rig</h1>
- <p>Progress is being made in Emmet County’s efforts to provide ambulance services in Northwest Michigan, with the arrival of one of several new ambulances Oct. 9 in Petoskey.</p><a href="#">Read More...</a>
- </div>
- </div>
- <div class="row">
- <div id="main-content" class="small-12 large-8 columns">
- <h1>Title Here</h1>
- <p>Doluptur sinis nihic teturitat id que prorro incturem dem volorit atiume ped mi, cusci rest voluptatium qui consedi odigeni musdae. Ipsa suntum quaecab il explia voluptam harum conet harupturit pratio que cum et litium lis sernatur sunt, ommolup tatiam hillam ratur? Acea verum in natet laut id moloremped et volupic iisqui ressin cus, venditia corum, con re sunt.<br><br>
-Quias eos et porerciis in nienihi lligeni ssiminu sapicienet volut a amus di cullat pa sin re pre voluptas adicitibus peris cum anti idem eiusani moluptatium aria doloribus, cus.<br><br>
-Abores eossumq uuntissum apienis doluptae quasit lam, nonseque nus exce rrum commoluptat quas volorempos quassu magnatium nonsect inverfe ratassint quaerro viderro renihicti apid esto blaciet eum quae ius magnihi lluptas que volupt quid ute porem.</p>
- </div>
- <div class="small-12 large-4 columns small-text-center large-text-left">
- <h1>EMS Events</h1>
- <img src="<?php echo get_template_directory_uri(); ?>/assets/calander.jpg">
- </div>
- </div>
- </div>
-<?php get_footer(); ?>
+ </div>
+<?php get_footer(); ?>
\ No newline at end of file
--- /dev/null
+<?php
+if ( ! class_exists( 'Feature_Top_Bar_Walker' ) ) :
+class Feature_Top_Bar_Walker extends Walker_Nav_Menu {
+
+ function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
+ static $mainLevelCounter;
+ if ($depth == 0) {
+ ++$mainLevelCounter;
+ }
+ $element->has_children = ! empty( $children_elements[ $element->ID ] );
+ $element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : '';
+ $element->classes[] = ( $element->has_children && 1 !== $max_depth ) ? 'has-dropdown' : '';
+ $element->classes[] = ( $element->post_parent == 0 && $mainLevelCounter < 3 ) ? '' : 'drop-left';
+ parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
+ }
+
+ function start_lvl( &$output, $depth = 0, $args = array() ) {
+ if ($depth == 0) {
+ $output .= "\n<ul class=\"sub-menu dropdown\">\n";
+ }
+ }
+
+}
+endif;
+/**
+ * glm_offcanvas_menu
+ *
+ * Generate the list of pages as nested ul li list
+ */
+
+if ( ! function_exists( 'feature_mobile_off_canvas' ) ) {
+ function feature_mobile_off_canvas() {
+ echo '<ul class="left-off-canvas-list">';
+ echo '<li class="page_item"><a href="' . get_bloginfo('url') . '">Home</a></li>';
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'off-canvas-list', // adding custom nav class
+ 'theme_location' => 'top-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 5, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'items_wrap' => '%3$s',
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! function_exists( 'bay_mobile_off_canvas' ) ) {
+ function bay_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'bay-view', // adding custom nav class
+ 'theme_location' => 'bay-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'art_mobile_off_canvas' ) ) {
+ function art_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'art-gallery', // adding custom nav class
+ 'theme_location' => 'art-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'river_mobile_off_canvas' ) ) {
+ function river_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'crooked-river', // adding custom nav class
+ 'theme_location' => 'river-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'bridge_mobile_off_canvas' ) ) {
+ function bridge_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'drawbridge', // adding custom nav class
+ 'theme_location' => 'bridge-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'perry_mobile_off_canvas' ) ) {
+ function perry_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'perry-hotel', // adding custom nav class
+ 'theme_location' => 'perry-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'pier_mobile_off_canvas' ) ) {
+ function pier_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'pier-restuarant', // adding custom nav class
+ 'theme_location' => 'pier-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'boat_mobile_off_canvas' ) ) {
+ function boat_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'pointer-boat', // adding custom nav class
+ 'theme_location' => 'boat-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'vacation_mobile_off_canvas' ) ) {
+ function vacation_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'vacation-rental', // adding custom nav class
+ 'theme_location' => 'vacation-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'weathervane_mobile_off_canvas' ) ) {
+ function weathervane_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'weathervane', // adding custom nav class
+ 'theme_location' => 'weathervane-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'about_mobile_off_canvas' ) ) {
+ function about_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'about', // adding custom nav class
+ 'theme_location' => 'about-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'property_mobile_off_canvas' ) ) {
+ function property_mobile_off_canvas() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'property-list', // adding custom nav class
+ 'theme_location' => 'property-mobile', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Offcanvas_Walker()
+ ));
+ }
+}
+if ( ! class_exists( 'Feature_Offcanvas_Walker' ) ) :
+class Feature_Offcanvas_Walker extends Walker_Nav_Menu {
+
+ function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
+ $element->has_children = ! empty( $children_elements[ $element->ID ] );
+ $element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : '';
+ $element->classes[] = ( $element->has_children && 1 !== $max_depth ) ? 'page_item_has_children' : '';
+ $element->classes[] = 'page_item';
+
+ parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
+ }
+
+ function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
+ $item_html = '';
+ parent::start_el( $item_html, $object, $depth, $args );
+
+ $classes = empty( $object->classes ) ? array() : (array) $object->classes;
+
+ if ( in_array( 'label', $classes ) ) {
+ $item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '<label>$1</label>', $item_html );
+ }
+
+ $output .= $item_html;
+ }
+
+ function start_lvl( &$output, $depth = 0, $args = array() ) {
+ $output .= "\n<ul class=\"children\">\n";
+ }
+
+ function end_lvl(&$output, $depth = 0, $args = array()){
+ $output .= '</ul>';
+ }
+
+}
+endif;
+?>
--- /dev/null
+<?php
+
+register_nav_menus(array(
+ 'top-bar' => 'Site Navigation',
+// 'mobile-off-canvas' => 'Mobile',
+ 'property-bar' => 'Properties Navigation',
+ 'property-mobile' => 'Mobile Property Navigation',
+ 'art-bar' => 'Art Gallery Navigation',
+ 'bay-bar' => 'Bay View Inn Navitgation',
+ 'river-bar' => 'Crooked River Lodge Navigation',
+ 'bridge-bar' => 'Drawbridge Bistro Navigation',
+ 'perry-bar' => 'Perry Hotel Navigation',
+ 'pier-bar' => 'Pier Restaurant Navigation',
+ 'boat-bar' => 'Pointer Boat Navigation',
+ 'vacation-bar' => 'Vacation Rental Navigation',
+ 'weathervane-bar' => 'Weathervane Restaurant Navigation',
+ 'about-bar' => 'About Navigation',
+// 'footer' => 'Footer'
+));
+$ancestorId = null;
+$includePages = array();
+$frontPageId = get_option('page_on_front');
+
+/**
+ * get_menu_options
+ *
+ * Grab the menu options from the theme.ini file
+ */
+function glm_get_menu_options()
+{
+ static $menu_options;
+ $themeConfig = get_template_directory() . '/theme.ini';
+
+ if (!$menu_options && is_file($themeConfig)) {
+ $menu_options = parse_ini_file($themeConfig, true);
+ }
+ return $menu_options;
+}
+/**
+ * glm_page_menu
+ *
+ * Grab the top level pages and their sub pages as the main navigation
+ */
+function glm_page_menu($parent = 0, $class = '')
+{
+ $menuConfig = glm_get_menu_options();
+ $frontPageId = get_option('page_on_front');
+ $parents = array();
+ $args = array(
+ 'post_type' => 'page',
+ 'parent' => $parent,
+ 'number' => '',
+ 'exclude' => $frontPageId,
+ 'post_status' => 'publish',
+ 'sort_order' => 'asc',
+ 'sort_column' => 'menu_order'
+ );
+ if ($parent == 0 && $menuConfig['menu_options']['main_level_pages']) {
+ $args['include'] = $menuConfig['menu_options']['main_level_pages'];
+ }
+ $pages = get_pages($args);
+ echo '<ul'.(($class)?' class="'.$class.'"':'').'><!-- begin -->'."\n";
+ foreach ($pages as $page) {
+ $childs = get_pages('child_of=' . $page->ID);
+ if (count($childs) > 0) {
+ echo '<li class="has-dropdown">'."\n";
+ echo '<a href="'.get_permalink($page->ID).'">'.$page->post_title.'</a>'."\n";
+ echo glm_page_menu($page->ID, 'sub-menu dropdown');
+ echo '</li>'."\n";
+ } else {
+ echo '<li><a href="'.get_permalink($page->ID).'">'.$page->post_title.'</a></li>'."\n";
+ }
+ }
+ echo '</ul><!-- end -->'."\n";
+}
+if ( ! function_exists( 'feature_top_bar' ) ) {
+ function feature_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => '', // adding custom nav class
+ 'theme_location' => 'top-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'property_top_bar' ) ) {
+ function property_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => '', // adding custom nav class
+ 'theme_location' => 'property-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'bay_top_bar' ) ) {
+ function bay_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'bay-view', // adding custom nav class
+ 'theme_location' => 'bay-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'art_top_bar' ) ) {
+ function art_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'art-gallery', // adding custom nav class
+ 'theme_location' => 'art-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'river_top_bar' ) ) {
+ function river_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'crooked-river', // adding custom nav class
+ 'theme_location' => 'river-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'bridge_top_bar' ) ) {
+ function bridge_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'drawbridge', // adding custom nav class
+ 'theme_location' => 'bridge-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'perry_top_bar' ) ) {
+ function perry_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'perry-hotel', // adding custom nav class
+ 'theme_location' => 'perry-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'pier_top_bar' ) ) {
+ function pier_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'pier-restuarant', // adding custom nav class
+ 'theme_location' => 'pier-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'boat_top_bar' ) ) {
+ function boat_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'pointer-boat', // adding custom nav class
+ 'theme_location' => 'boat-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'vacation_top_bar' ) ) {
+ function vacation_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'vacation-rental', // adding custom nav class
+ 'theme_location' => 'vacation-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'weathervane_top_bar' ) ) {
+ function weathervane_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'weathervane', // adding custom nav class
+ 'theme_location' => 'weathervane-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+if ( ! function_exists( 'about_top_bar' ) ) {
+ function about_top_bar() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => 'about', // adding custom nav class
+ 'theme_location' => 'about-bar', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 3, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Feature_Top_Bar_Walker()
+ ));
+ }
+}
+function glm_side_menu() {
+ global $post;
+ $parents = get_post_ancestors($post->ID);
+ $id = ($parents) ? $parents[count($parents)-1]: $post->ID;
+ $parent = get_page( $id );
+ if ($id == 0) {
+ $ID = $post->ID;
+ } else {
+ $ID = $parent->ID;
+ }
+ echo '<h1>'.get_the_title($ID).'</h1>';
+ echo '<ul class="sidebar"><!-- begin -->'."\n";
+ echo wp_list_pages( 'child_of='.$ID.'&title_li=&depth=1&echo=0');
+ echo '</ul><!-- end -->'."\n";
+}
+?>
+++ /dev/null
-<?php get_header(); ?>
-<header>
- <?php get_template_part('parts/top-bar_main');?>
- <?php get_template_part('parts/off-canvas_main');?>
- <?php get_template_part('parts/head-image');?>
-</header>
- <main class="page-inside">
- <div id="content-wrapper">
- <div class="row">
- <?php
- get_template_part('parts/bread-crumbs');
- ?>
- </div>
- <div class="row">
- <div id="main-content" class="small-12 medium-8 columns">
- <?php if(have_posts()) : while(have_posts()): the_post();?>
- <?php the_content();?>
- <?php endwhile; else:?>
- <p><?php _e('Sorry, no posts yet');?></p>
- <?php endif;?>
- </div>
- <div class="small-12 medium-4 medium-offset-0 large-offset-1 large-3 columns small-text-left">
- <div class="sidebar">
- <h2>Central Reservations</h2>
- <h3>800-737-1899</h3>
- <h2>Email</h2>
- <a href="mailto:hospitality@staffords.com">hospitality@staffords.com</a>
- <h2>Stafford's Hospitality</h2>
- <p>PO Box 657<br>Petoskey, Michigan 49770</p>
- <ul>
- <li><a class="facebook" target="_blank" href="https://www.facebook.com/staffordshospitality"></a></li>
- <li><a class="tweet" target="_blank" href="https://twitter.com/petoskeylodging"></a></li>
- <li><a class="pin" target="_blank" href="https://www.pinterest.com/staffordsnmich/"></a></li>
- <li><a class="youtube" target="_blank" href="https://www.youtube.com/user/staffordsnmichigan"></a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
-<?php get_footer(); ?>
\ No newline at end of file
<?php
/*
-Template Name: Weathervane Resturant
+Template Name: Weathervane Restaurant
*/
?>
<?php get_header(); ?>
<?php if(function_exists('fetch_all_glm_blocks')):?>
-<?php $blocks = fetch_all_glm_blocks();?>
+<?php
+//$defaultBlockGroup = 1406;
+if (is_page_template('page_bay-view.php')) {
+ $defaultBlockGroup = 1406;
+}
+if (is_page_template('page_crooked-river.php')) {
+ $defaultBlockGroup = 117;
+}
+?>
+<?php $blocks = fetch_all_glm_blocks($defaultBlockGroup);?>
<div class="blocks">
<?php foreach ($blocks as $block):?>
<div class="text-left small-8 small-centered medium-uncentered medium-4 columns blocks">
</a>
<?php endif;?>
<p><?php echo $block->post_content . $block->post_excerpt;?></p>
+ <?php if($block->url):?>
<a class="blocks-readmore" href="<?php echo $block->url;?>">find out more...</a>
+ <?php endif;?>
<div class="separator text-center"><img src="<?php bloginfo('template_url'); ?>/assets/fancy-divider-large.jpg"></div>
</div>
<?php endforeach;?>
<?php {
echo '<div id="slideshow">';
echo do_shortcode("[metaslider id=75]");
+ echo do_shortcode("[metaslider id=48]");
echo '<div class="gradient"></div>';
echo '<div class="gradient"></div>';
echo '</div>';