'ffffff', 'default-image' => '', ) ) ); } /** * Make theme available for translation * Translations can be filed in the /languages/ directory * If you're building a theme based on giant, use a find and replace * to change 'giant' to the name of your theme in all the template files */ load_theme_textdomain( 'giant', get_template_directory() . '/languages' ); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'primary' => __( 'Header bottom menu', 'giant' ), ) ); /** * Enable support for Slider Thumbnails */ add_image_size( 'giant-slider-image', 960, 353, true ); } endif; // giant_setup add_action( 'after_setup_theme', 'giant_setup' ); /** * Register widgetized area and update sidebar with default widgets */ function giant_widgets_init() { register_sidebar( array( 'name' => __( 'Right Sidebar', 'giant' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'giant_widgets_init' ); /** * Enqueue scripts and styles */ function giant_scripts() { // load bootstrap css wp_enqueue_style( 'giant-bootstrapcss', get_template_directory_uri() . '/css/bootstrap.min.css' ); // load giant styles wp_enqueue_style( 'giant-style', get_stylesheet_uri() ); // load bootstrap js wp_enqueue_script('giant-bootstrapjs', get_template_directory_uri().'/js/bootstrap.min.js', array('jquery') ); // load bootstrap wp js wp_enqueue_script( 'giant-bootstrapwp', get_template_directory_uri() . '/js/bootstrap-wp.js', array('jquery') ); wp_enqueue_script( 'giant-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'giant-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } /* * Adds slider Javascript */ wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/flexslider.min.js', array( 'jquery' ), null, true ); /* * Adds ticker Javascript */ wp_enqueue_script( 'ticker', get_template_directory_uri() . '/js/jquery.ticker.min.js', array( 'jquery' ), null, true ); } add_action( 'wp_enqueue_scripts', 'giant_scripts' ); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; /** * Load custom WordPress nav walker. */ require get_template_directory() . '/inc/bootstrap-wp-navwalker.php'; /* * flexslider js customization */ function giant_slider_script() { ?> 'tickrid', 'speed' => '3000', 'typespeed' => '50', 'text' => 'Latest News', ), $atts, 'projects' ) ); $cat_id = get_theme_mod( 'giant_category' ); $count = get_theme_mod('giant_ticker_count'); $q = new WP_Query( array( 'posts_per_page' => $count, 'post_type' => 'post', 'category_name' => get_cat_name( $cat_id ), ) ); $list = '
'.$text.'
'; wp_reset_query(); return $list; }