updating
authorIan Weller <ian@gaslightmedia.com>
Fri, 27 Jan 2017 19:20:55 +0000 (14:20 -0500)
committerIan Weller <ian@gaslightmedia.com>
Fri, 27 Jan 2017 19:20:55 +0000 (14:20 -0500)
I added a php echo shortcode to show a slideshow that matches the same
slideshow dimensions as the original for better demo

functions.php
parts/slide-show.php

index 7c0f23c..8beaaa1 100644 (file)
@@ -25,71 +25,7 @@ if (!function_exists('glm_quicksite_widget_init')) {
 
 }
 
-/**
- * Mobile off-canvas
- */
-if ( ! function_exists( 'glm_theme_mobile_off_canvas' ) ) {
-    function glm_theme_mobile_off_canvas() {
-        echo '<div class="left-off-canvas-list">';
-        echo '<ul><li class="page_item"><a href="' . get_bloginfo('url') . '">Home</a></li>';
-        echo glm_get_mobile_nav_menu( 'top-bar' );
-        echo glm_get_mobile_nav_menu( 'footer' );
-        echo '</ul></div>';
-    }
-}
-/**
- * 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";
-}
 
 
 function SearchFilter($query) {
@@ -103,19 +39,6 @@ function SearchFilter($query) {
 }
 add_filter('pre_get_posts','SearchFilter');
 
-/**
- * glm_offcanvas_menu
- *
- * 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'
-    ));
-}
 add_action('after_setup_theme', 'glm_theme_setup');
 function glm_theme_setup ()
 {
index fe64b6e..a0d4302 100644 (file)
@@ -1,6 +1,10 @@
-<?php if (is_front_page()) {
-    echo '<div id="slideshow">';
-        echo '<p>Slideshow here</p>';
-    echo '</div>';
-}
-?>
+<?php if (is_front_page()) : ?>
+       <div id="slideshow">
+        <?php 
+            echo do_shortcode("[metaslider id=596]"); 
+        ?>
+            <?php if ( is_active_sidebar( 'slideshow' ) ) : ?>
+               <?php dynamic_sidebar( 'slideshow' ); ?>
+            <?php endif; ?>
+       </div>
+<?php endif; ?>
\ No newline at end of file