srikat

Untitled

Oct 5th, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <?php
  2.  
  3. add_theme_support( 'genesis-menus' , array(
  4. 'primary' => __( 'Primary Navigation Menu', 'smart-passive-income-pro' ),
  5. 'secondary' => __( 'Footer Menu', 'smart-passive-income-pro' ),
  6. 'fixed' => __( 'Fixed Navigation Menu', 'genesis-sample' )
  7. ) );
  8.  
  9. // Display Fixed Navigation Menu above header
  10. add_action( 'genesis_before_header', 'sk_do_fixednav' );
  11. /**
  12. * Echo the "Fixed Navigation" menu.
  13. *
  14. * @uses genesis_nav_menu() Display a navigation menu.
  15. * @uses genesis_nav_menu_supported() Checks for support of specific nav menu.
  16. */
  17. function sk_do_fixednav() {
  18.  
  19. //* Do nothing if menu not supported
  20. if ( ! genesis_nav_menu_supported( 'fixed' ) )
  21. return;
  22.  
  23. $class = 'menu genesis-nav-menu menu-fixed';
  24. if ( genesis_superfish_enabled() ) {
  25. $class .= ' js-superfish';
  26. }
  27.  
  28. genesis_nav_menu( array(
  29. 'theme_location' => 'fixed',
  30. 'menu_class' => $class,
  31. ) );
  32.  
  33. }
  34.  
  35. // Add typical attributes for footer navigation elements.
  36. add_filter( 'genesis_attr_nav-fixed', 'genesis_attributes_nav' );
  37.  
  38. // Add support for structural wraps
  39. add_theme_support( 'genesis-structural-wraps', array(
  40. 'header',
  41. 'nav',
  42. 'subnav',
  43. 'fixed',
  44. 'site-inner',
  45. 'footer-widgets',
  46. 'footer'
  47. ) );
Advertisement
Add Comment
Please, Sign In to add comment