__( 'Primary Navigation', 'choco' ), ) ); // This theme allows users to set a custom background add_theme_support( 'custom-background' ); //Add support for Post Formats add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); } endif; /** * Enqueue scripts and styles */ function choco_scripts() { wp_enqueue_style( 'choco', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'choco_scripts' ); /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. * * To override this in a child theme, remove the filter and optionally add * your own function tied to the wp_page_menu_args filter hook. * */ function choco_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'choco_page_menu_args' ); /** * Removes the default styles that are packaged with the Recent Comments widget. * * To override this in a child theme, remove the filter and optionally add your own * function tied to the widgets_init action hook. * */ function choco_remove_recent_comments_style() { add_filter( 'show_recent_comments_widget_style', '__return_false' ); } add_action( 'widgets_init', 'choco_remove_recent_comments_style' ); /** * Remove inline styles printed when the gallery shortcode is used. * * Galleries are styled by the theme's style.css. This is just * a simple filter call that tells WordPress to not use the default styles. * */ add_filter( 'use_default_gallery_style', '__return_false' ); /** * Deprecated way to remove inline styles printed when the gallery shortcode is used. * * This function is no longer needed or used. Use the use_default_gallery_style * filter instead, as seen above. * */ function choco_remove_gallery_css( $css ) { return preg_replace( "##s", '', $css ); } add_filter( 'gallery_style', 'choco_remove_gallery_css' ); register_sidebar( array ( 'name' => 'Sidebar', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); /** *Changed wp_page_menu structure to get rid of the wrapped div and add menu_class arguments to