Advertisement
robinbutton

code in functions.php

Jan 23rd, 2014
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php
  2.  
  3. // de-queue navigation js
  4. add_action('wp_print_scripts','tto_dequeue_navigation');
  5. function tto_dequeue_navigation() {
  6. wp_dequeue_script( 'twentytwelve-navigation' );
  7. }
  8. // load the new navigation js
  9. function tto_custom_scripts()
  10. {
  11.  
  12. // Register the new navigation script
  13. wp_register_script( 'primarymobile-script', get_stylesheet_directory_uri() . '/js/navigation.js', array(), '1.0', true );
  14.  
  15. // Enqueue the new navigation script
  16. wp_enqueue_script( 'primarymobile-script' );
  17. }
  18. add_action( 'wp_enqueue_scripts', 'tto_custom_scripts' );
  19.  
  20. // Add the new menu
  21. register_nav_menus( array(
  22. 'primary' => __( 'Top Menu (Above Header)', 'tto' ),
  23. 'secondary' => __( 'Primary Mobile (Below Header))', 'tto'),
  24. ) );
  25.  
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement