Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Functions file for the Lyle Gomes child them */
- function lylegomes_setup() {
- // This theme uses wp_nav_menu() in one location.
- register_nav_menu( 'secondary', __( 'Footer Menu', 'twentytwelve' ) );
- register_nav_menu( 'mobile', __( 'Header Menu', 'twentytwelve' ) );
- register_nav_menu( 'additional-portfolios', __( 'Header Menu', 'twentytwelve' ) );
- }
- add_action( 'after_setup_theme', 'lylegomes_setup', 11 );
- // Add the site description for the home/front page.
- $site_description = get_bloginfo( 'description', 'display' );
- if ( $site_description && ( is_home( 'Lyle Gomes' ) || is_front_page() ) )
- $title = "$title $sep $site_description";
- function twentytwelve_child_page_menu_args( $args ) {
- $args['depth'] = 1;
- return $args;
- }
- add_filter( 'wp_page_menu_args', 'twentytwelve_child_page_menu_args', 20 );
- // Adds JavaScript for dequeuing the twenty twelve script and adding the custom one, handling the mobile navigation menu hide-and-show behavior. Note the js file name change and that get template directory was changed to get stylesheet directory
- function lylegomes_scripts() {
- wp_dequeue_script( 'twentytwelve-navigation' );
- wp_enqueue_script( 'primary-mobile', get_stylesheet_directory_uri() . '/js/nav.js', array(), '1.0', true );
- }
- add_action( 'wp_enqueue_scripts', 'lylegomes_scripts' );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement