Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress Custom Menu Development in WordPress The Walker Class for WordPress Setting up a Custom Walker Class File

Error in functions file: add_action( 'init', 'register_theme_menus' );

for some reason, the add_action line killing my site and nothing loads. Does anyone see an issue with my file?

<?php
    function wpt_theme_styles() {

        wp_enqueue_style(  'skeleton_css', get_template_directory_uri() . '/css/skeleton.css' );

        wp_enqueue_style(  'normalize_css', get_template_directory_uri() . '/css/normalize.css' );

        wp_enqueue_style(  'unslider', get_template_directory_uri() . '/css/unslider.css' );

        wp_enqueue_style(  'main_css', get_template_directory_uri() . '/style.css' );
    }

    add_action( 'wp_enqueue_scripts', 'wpt_theme_styles');

    function wpt_theme_js() {

        wp_enqueue_script( 'jqueryslicknav_js' , get_template_directory_uri() . '/js/jquery.slicknav.mn.js' ,array('jquery'),'', true );

        wp_enqueue_script( 'jquerystickykit_js' , get_template_directory_uri() . '/js/jquery.sticky-kit.js' ,array('jquery'),'', false );

         wp_enqueue_script( 'unslider.js' , get_template_directory_uri() . '/js/unslider.js' ,array('jquery'),'', false );

         wp_enqueue_script( 'fade.js' , get_template_directory_uri() . '/js/fade.js' ,array('jquery'),'', true );


    }

    //remove_filter( 'the_content', 'wpautop' );
    //remove_filter( 'the_excerpt', 'wpautop' );

    add_theme_support( 'menus');


    require_once dirname( __FILE__ ) . '/menu-item-custom-fields/menu-item-custom-fields.php';
    require_once dirname( __FILE__ ) . '/inc/custom-walker.php';

    function register_theme_menus() {
            register_nav_menus(
                array (
                    'sidebar-menu' => _( 'Sidebar Menu')
                )
            );

    }

    add_action( 'init', 'register_theme_menus' );




    add_action( 'wp_enqueue_scripts','wpt_theme_js');
?>