}
register_nav_menus(array(
- 'top-bar' => 'Site Navigation',
- 'mobile-off-canvas' => 'Mobile',
+// 'top-bar' => 'Site Navigation',
+// 'mobile-off-canvas' => 'Mobile',
'property-bar' => 'Properties Navigation',
'art-bar' => 'Art Gallery Navigation',
'bay-bar' => 'Bay View Inn Navitgation',
'vacation-bar' => 'Vacation Rental Navigation',
'weathervane-bar' => 'Weathervane Restaurant Navigation',
'about-bar' => 'About Navigation',
+ 'art-canvas' => 'Art Gallery Mobile',
+ 'property-canvas' => 'Properties Mobile',
+ 'bay-canvas' => 'Bay View Inn Mobile',
+ 'river-canvas' => 'Crooked River Lodge Mobile',
+ 'bridge-canvas' => 'Drawbridge Bistro Mobile',
+ 'perry-canvas' => 'Perry Hotel Mobile',
+ 'pier-canvas' => 'Pier Restaurant Mobile',
+ 'boat-canvas' => 'Pointer Boat Mobile',
+ 'vacation-canvas' => 'Vacation Rental Mobile',
+ 'weathervane-canvas' => 'Weathervane Mobile',
+ 'about-canvas' => 'About Mobile',
// 'footer' => 'Footer'
));
*
* Generate the list of pages as nested ul li list
*/
-function glm_offcanvas_menu()
-{
- wp_page_menu(array(
- 'depth' => 0,
- 'sort_column' => 'menu_order',
- 'menu_class' => 'left-off-canvas-list'
- ));
+
+if ( ! function_exists( 'stafford_mobile_off_canvas' ) ) {
+ function stafford_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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! function_exists( 'art_mobile_off_canvas' ) ) {
+ function art_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' => 'art-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! function_exists( 'bay_mobile_off_canvas' ) ) {
+ function bay_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' => 'bay-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! function_exists( 'river_mobile_off_canvas' ) ) {
+ function river_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' => 'river-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! function_exists( 'bridge_mobile_off_canvas' ) ) {
+ function bridge_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' => 'bridge-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
}
+if ( ! function_exists( 'perry_mobile_off_canvas' ) ) {
+ function perry_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' => 'perry-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}if ( ! function_exists( 'pier_mobile_off_canvas' ) ) {
+ function pier_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' => 'pier-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! function_exists( 'boat_mobile_off_canvas' ) ) {
+ function boat_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' => 'boat-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! function_exists( 'vacation_mobile_off_canvas' ) ) {
+ function vacation_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' => 'vacation-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! function_exists( 'weathervane_mobile_off_canvas' ) ) {
+ function weathervane_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' => 'weathervane-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! function_exists( 'about_mobile_off_canvas' ) ) {
+ function about_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' => 'about-canvas', // 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 Stafford_Offcanvas_Walker()
+ ));
+ echo '</ul>';
+ }
+}
+if ( ! class_exists( 'Stafford_Offcanvas_Walker' ) ) :
+class Stafford_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);
/**