tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); } function load_stylesheets(){ wp_register_style('bootstrap', THEME_URI .'/css/bootstrap.min.css',array(),false,'all'); wp_enqueue_style('bootstrap'); wp_register_style('style', THEME_URI .'/style.css',array(),false,'all'); wp_enqueue_style('style'); wp_register_style('animate', THEME_URI .'/css/animate.css',array(),false,'all'); wp_enqueue_style('animate'); wp_register_style('fontawesome_style', THEME_URI .'/css/font-awesome.min.css',array(),false,'all'); wp_enqueue_style('fontawesome_style'); wp_register_style('flexslider', THEME_URI .'/css/flexslider.css',array(),false,'all'); wp_enqueue_style('flexslider'); wp_register_style('owl', THEME_URI .'/css/owl.carousel.min.css',array(),false,'all'); wp_enqueue_style('owl'); wp_register_style('owltheme', THEME_URI .'/css/owl.theme.default.min.css',array(),false,'all'); wp_enqueue_style('owltheme'); wp_register_style('magnific', THEME_URI .'/css/magnific-popup.css',array(),false,'all'); wp_enqueue_style('magnific'); wp_register_style('default', THEME_URI .'/css/default.css',array(),false,'all'); wp_enqueue_style('default'); if ( is_page( 'careers' ) || is_page( 'portfolio' ) || is_page( 'blog' ) ) { wp_register_style( 'stylesheet_ourwork', THEME_URI .'/css/style_ourwork.css',array(),false,'all'); wp_enqueue_style('stylesheet_ourwork'); } if(is_page('portfolio')){ wp_register_style('mdb', THEME_URI .'/css/mdb.min.css',array(),false,'all'); wp_enqueue_style('mdb'); } } add_action('wp_enqueue_scripts','load_stylesheets'); if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); function include_jquery(){ //wp_deregister_script('jquery'); wp_enqueue_script('jquery',THEME_URI .'/js/jquery-2.2.1.min.js',array(),'',1,true); add_action('wp_enqueue_scripts','jquery'); } add_action('wp_enqueue_scripts','include_jquery'); /************************************************************************************* * Set Max Content Width *************************************************************************************/ if ( ! isset( $content_width ) ) $content_width = 1000; /************************************************************************************* * Post Formats *************************************************************************************/ if( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-formats', array( 'audio', 'gallery', 'image', 'link', 'quote', 'video', )); } /************************************************************************************* * Post Thumbnails *************************************************************************************/ add_theme_support( 'post-thumbnails' ); add_theme_support( "custom-header", $args ); add_theme_support( "custom-background", $args ); add_editor_style(); /************************************************************************************* * Automatic Feed Links *************************************************************************************/ add_theme_support( 'automatic-feed-links' ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function grado_widgets_init() { register_sidebar( array( 'name' => __( 'Footer', 'grado' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your footer.', 'grado' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'grado_widgets_init' ); function wpb_hook_javascript() { if (is_page ('contact-us')) { ?> __('Top Menu','grado'), 'footer-menu' => __('Footer Menu','grado'), ) ); function excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).'...'; } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`[[^]]*]`','',$excerpt); return $excerpt; } function max_title_length( $title ) { $max = 20; if( strlen( $title ) > $max ) { return substr( $title, 0, $max ). " …"; } else { return $title; } } defined( 'THEME_DIR' ) or define( 'THEME_DIR', get_template_directory() ); defined( 'THEME_URI' ) or define( 'THEME_URI', get_template_directory_uri() ); defined( 'PLUGIN_DIR' ) or define( 'PLUGIN_DIR', THEME_DIR . '/inc/plugins' ); defined( 'PLUGIN_URI' ) or define( 'PLUGIN_URI', THEME_URI . '/inc/plugins' ); /** * Load TGMPA Configs. */ require_once( THEME_DIR . '/inc/tgm-plugin-activation/class-tgm-plugin-activation.php' ); require_once( THEME_DIR . '/inc/tgm-plugin-activation/tgmpa-grado.php' ); /** * Theme Options */ require( trailingslashit( get_template_directory() ) . 'includes/theme-options.php' ); ?>