__( 'Top Menu', 'eleganto' ), 'footer_menu' => __( 'Footer Menu', 'eleganto' ), ) ); // Add support for a featured image and the size add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 300, 300, true ); add_image_size( 'eleganto-home', 400, 300, true ); add_image_size( 'eleganto-square', 400, 400, true ); add_image_size( 'eleganto-single', 1600, 400, true ); // Add Custom logo Support add_theme_support( 'custom-logo', array( 'height' => 70, 'width' => 240, 'flex-height' => true, 'flex-width' => true, ) ); // Add Custom Background Support $args = array( 'default-color' => '222222', ); add_theme_support( 'custom-background', $args ); // Adds RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); // WooCommerce support add_theme_support( 'woocommerce' ); } endif; //////////////////////////////////////////////////////////////////// // Enqueue Styles (normal style.css and bootstrap.css) //////////////////////////////////////////////////////////////////// function eleganto_theme_stylesheets() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '3.3.6', 'all' ); wp_enqueue_style( 'eleganto-stylesheet', get_stylesheet_uri(), array(), '1.2.1', 'all' ); // load Font Awesome css wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.7.0', 'all' ); wp_enqueue_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css', array(), '2.6.0', 'all' ); wp_enqueue_style( 'eleganto-portfolio-css', get_template_directory_uri() . '/css/portfolio.css', array(), '1', 'all' ); } add_action( 'wp_enqueue_scripts', 'eleganto_theme_stylesheets' ); //////////////////////////////////////////////////////////////////// // Register Bootstrap JS with jquery //////////////////////////////////////////////////////////////////// function eleganto_theme_js() { wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true ); wp_enqueue_script( 'eleganto-theme-js', get_template_directory_uri() . '/js/customscript.js', array( 'jquery' ), '1.2.1', true ); wp_enqueue_script( 'eleganto-menu-sticky', get_template_directory_uri() . '/js/sticky-menu.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array( 'jquery' ), '2.6.1', true ); if ( post_type_exists( 'portfolio' ) ) { wp_enqueue_script( 'isotope', get_template_directory_uri() . '/js/isotope.pkgd.min.js', array( 'jquery' ), '3.0.1', true ); wp_enqueue_script( 'imagesLoaded', get_template_directory_uri() . '/js/imagesloaded.pkgd.min.js', array( 'jquery' ), '4.4.1', true ); } wp_enqueue_script( 'smooothscroll', get_template_directory_uri() . '/js/jquery.imageScroll.min.js', array( 'jquery' ), '0.2.3', true ); } add_action( 'wp_enqueue_scripts', 'eleganto_theme_js' ); //////////////////////////////////////////////////////////////////// // Register Custom Navigation Walker include custom menu widget to use walkerclass //////////////////////////////////////////////////////////////////// require_once( trailingslashit( get_template_directory() ) . 'lib/wp_bootstrap_navwalker.php' ); //////////////////////////////////////////////////////////////////// // Theme Info page //////////////////////////////////////////////////////////////////// if ( is_admin() && !is_child_theme() ) { include_once(trailingslashit( get_template_directory() ) . 'lib/welcome/welcome-screen.php'); } //////////////////////////////////////////////////////////////////// // Register the Sidebar(s) //////////////////////////////////////////////////////////////////// add_action( 'widgets_init', 'eleganto_widgets_init' ); function eleganto_widgets_init() { register_sidebar( array( 'name' => __( 'Right Sidebar', 'eleganto' ), 'id' => 'eleganto-right-sidebar', 'before_widget' => '
', 'before_title' => '