Advertisement
marjwyatt

Modify Genesis Footer Output

Apr 9th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. // replaces #wrap in default framework shortcode with a true "go to top" href
  2. // code for adding 3rd navigation menu in footer area
  3. // Footer Nav Script placed in child theme folder defined by environment variable in functions file
  4.  
  5. // Customize Footer Output to include footer menu navigation
  6. add_filter( 'genesis_footer_output', 'footer_output_filter', 10, 3 );
  7. function footer_output_filter( $output, $backtotop_text, $creds_text ) {
  8.     require(CHILD_STRUCTURE_DIR.'/footernav.php');
  9.     $backtotop_text = '[footer_backtotop text="Go To Top" href="#"]';
  10.     $creds_text = '© Copyright '. date('Y') . ' ' . get_bloginfo('name') . ' . All rights reserved';
  11.     $output = '<div class="gototop">' . $backtotop_text . '</div>' . '<div class="creds">' . $creds_text . '</div>';
  12.     return $output;
  13. }
  14.  
  15. // Remove Custom Menu support
  16. remove_theme_support ( 'genesis-menus' ); // removes default Genesis Menus
  17.  
  18. // Default Menus: re-registers default menus and add footer menu
  19. add_theme_support ( 'genesis-menus' , array ( 'primary' => 'Primary Navigation Menu' , 'secondary' => 'Secondary Navigation Menu' ,'footerlinks' => 'Footer Links Menu' ) );
  20.  
  21. // Footer Nav Script
  22. <?php
  23. echo '<div id="footernav"><div class="footernav-wrap">';
  24. wp_nav_menu( array( 'sort_column' => 'menu_order',
  25.     'container_id' => 'footerlinks' ,
  26.     'menu_class' => 'menu footerlinks superfish sf-js-enabled',
  27.     'fallback_cb' => 'false',
  28.     'theme_location' => 'footerlinks') );
  29. echo '</div></div>';
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement