Advertisement
loonattic

GP footer.php with tertiary menu

Sep 14th, 2015
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.17 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying the footer.
  4. *
  5. * Contains the closing of the id=main div and all content after
  6. *
  7. * @package GeneratePress
  8. */
  9. ?>
  10.  
  11. </div><!-- #content -->
  12. </div><!-- #page -->
  13. <?php do_action('generate_before_footer'); ?>
  14. <div <?php generate_footer_class(); ?>>
  15. <?php
  16. do_action('generate_before_footer_content');
  17.  
  18. // Get how many widgets to show
  19. $widgets = generate_get_footer_widgets();
  20.  
  21. if ( !empty( $widgets ) && 0 !== $widgets ) :
  22.  
  23. // Set up the widget width
  24. $widget_width = '';
  25. if ( $widgets == 1 ) $widget_width = '100';
  26. if ( $widgets == 2 ) $widget_width = '50';
  27. if ( $widgets == 3 ) $widget_width = '33';
  28. if ( $widgets == 4 ) $widget_width = '25';
  29. if ( $widgets == 5 ) $widget_width = '20';
  30. ?>
  31. <div id="footer-widgets" class="site footer-widgets">
  32. <div class="inside-footer-widgets grid-container grid-parent">
  33. <?php if ( $widgets >= 1 ) : ?>
  34. <div class="footer-widget-1 grid-parent grid-<?php echo apply_filters( 'generate_footer_widget_1_width', $widget_width ); ?> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_1_tablet_width', '50' ); ?>">
  35. <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-1')): ?>
  36. <aside class="widget inner-padding widget_text">
  37. <h4 class="widget-title"><?php _e('Footer Widget 1','generate');?></h4>
  38. <div class="textwidget">
  39. <p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 1.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
  40. <p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
  41. </div>
  42. </aside>
  43. <?php endif; ?>
  44. </div>
  45. <?php endif;
  46.  
  47. if ( $widgets >= 2 ) : ?>
  48. <div class="footer-widget-2 grid-parent grid-<?php echo apply_filters( 'generate_footer_widget_2_width', $widget_width ); ?> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_2_tablet_width', '50' ); ?>">
  49. <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-2')): ?>
  50. <aside class="widget inner-padding widget_text">
  51. <h4 class="widget-title"><?php _e('Footer Widget 2','generate');?></h4>
  52. <div class="textwidget">
  53. <p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 2.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
  54. <p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
  55. </div>
  56. </aside>
  57. <?php endif; ?>
  58. </div>
  59. <?php endif;
  60.  
  61. if ( $widgets >= 3 ) : ?>
  62. <div class="footer-widget-3 grid-parent grid-<?php echo apply_filters( 'generate_footer_widget_3_width', $widget_width ); ?> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_3_tablet_width', '50' ); ?>">
  63. <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-3')): ?>
  64. <aside class="widget inner-padding widget_text">
  65. <h4 class="widget-title"><?php _e('Footer Widget 3','generate');?></h4>
  66. <div class="textwidget">
  67. <p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 3.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
  68. <p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
  69. </div>
  70. </aside>
  71. <?php endif; ?>
  72. </div>
  73. <?php endif;
  74.  
  75. if ( $widgets >= 4 ) : ?>
  76. <div class="footer-widget-4 grid-parent grid-<?php echo apply_filters( 'generate_footer_widget_4_width', $widget_width ); ?> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_4_tablet_width', '50' ); ?>">
  77. <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-4')): ?>
  78. <aside class="widget inner-padding widget_text">
  79. <h4 class="widget-title"><?php _e('Footer Widget 4','generate');?></h4>
  80. <div class="textwidget">
  81. <p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 4.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
  82. <p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
  83. </div>
  84. </aside>
  85. <?php endif; ?>
  86. </div>
  87. <?php endif;
  88.  
  89. if ( $widgets >= 5 ) : ?>
  90. <div class="footer-widget-5 grid-parent grid-<?php echo apply_filters( 'generate_footer_widget_5_width', $widget_width ); ?> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_5_tablet_width', '50' ); ?>">
  91. <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-5')): ?>
  92. <aside class="widget inner-padding widget_text">
  93. <h4 class="widget-title"><?php _e('Footer Widget 5','generate');?></h4>
  94. <div class="textwidget">
  95. <p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 5.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
  96. <p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
  97. </div>
  98. </aside>
  99. <?php endif; ?>
  100. </div>
  101. <?php endif; ?>
  102. </div>
  103. </div>
  104. <?php
  105. endif;
  106. do_action('generate_after_footer_widgets');
  107. ?>
  108.  
  109. <!-- Footer Menu Start -->
  110.  
  111. <nav class="tertiary-navigation grid-container grid-parent" role="navigation" id="tertiary-navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
  112. <div class="inside-navigation grid-container grid-parent">
  113. <button class="menu-toggle tertiary-menu-toggle">
  114. <span class="mobile-menu">Menu</span>
  115. </button>
  116. <div class="main-nav"><ul class="tertiary-menu sf-menu nav-menu sf-js-enabled" id="menu-xpressnetisp-footer-menu" aria-expanded="false"><li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-328" id="menu-item-328" aria-haspopup="true"><a href="http://xpressnet.inthelink.ca/index.php/about-us/" title="About Us" class="sf-with-ul"><i class="fa fa-info fa-fw fa-border"></i> About Us</a><a aria-expanded="false" class="dropdown-toggle" href="#"><i class="fa fa-caret-down"></i></a>
  117. <ul class="sub-menu" style="display: none;">
  118. <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-330" id="menu-item-330" aria-haspopup="true"><a href="http://#" class="sf-with-ul">Placeholder 01</a><a aria-expanded="false" class="dropdown-toggle" href="#"><i class="fa fa-caret-down"></i></a>
  119. <ul class="sub-menu" style="display: none;">
  120. <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-331" id="menu-item-331" aria-haspopup="true"><a href="http://#" class="sf-with-ul">Placeholder 02</a><a aria-expanded="false" class="dropdown-toggle" href="#"><i class="fa fa-caret-down"></i></a>
  121. <ul class="sub-menu" style="display: none;">
  122. <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-332" id="menu-item-332"><a href="http://#">Placeholder 03</a></li>
  123. </ul>
  124. </li>
  125. </ul>
  126. </li>
  127. </ul>
  128. </li>
  129. <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-64" id="menu-item-64"><a href="http://xpressnet.inthelink.ca/index.php/privacy-policy/">Privacy Policy</a></li>
  130. <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-128" id="menu-item-128"><a href="http://xpressnet.inthelink.ca/index.php/terms-of-service/">Terms of Service</a></li>
  131. <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-76" id="menu-item-76"><a href="http://xpressnet.inthelink.ca/index.php/shipping/">Shipping</a></li>
  132. <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-65" id="menu-item-65"><a href="http://xpressnet.inthelink.ca/index.php/sitemap/">Sitemap</a></li>
  133. </ul></div> </div><!-- .inside-navigation -->
  134. </nav>
  135.  
  136. <!-- Footer Menu End -->
  137.  
  138. <footer class="site-info" itemtype="http://schema.org/WPFooter" itemscope="itemscope" role="contentinfo">
  139. <div class="inside-site-info grid-container grid-parent">
  140. <?php do_action( 'generate_credits' ); ?>
  141. </div>
  142. </footer><!-- .site-info -->
  143. <?php do_action( 'generate_after_footer_content' ); ?>
  144. </div><!-- .site-footer -->
  145.  
  146. <?php wp_footer(); ?>
  147.  
  148. </body>
  149. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement