Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // de-queue navigation js
- add_action('wp_print_scripts','tto_dequeue_navigation');
- function tto_dequeue_navigation() {
- wp_dequeue_script( 'twentytwelve-navigation' );
- }
- // load the new navigation js
- function tto_custom_scripts()
- {
- // Register the new navigation script
- wp_register_script( 'primarymobile-script', get_stylesheet_directory_uri() . '/js/navigation.js', array(), '1.0', true );
- // Enqueue the new navigation script
- wp_enqueue_script( 'primarymobile-script' );
- }
- add_action( 'wp_enqueue_scripts', 'tto_custom_scripts' );
- // Add the new menu
- register_nav_menus( array(
- 'primary' => __( 'Top Menu (Above Header)', 'tto' ),
- 'secondary' => __( 'Primary Mobile (Below Header))', 'tto'),
- ) );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement