tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); /** * Add callback for custom TinyMCE editor stylesheets. (editor-style.css) * @see http://codex.wordpress.org/Function_Reference/add_editor_style */ add_editor_style( 'css/editor-style.css' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'book-landing-page' ), 'Secondary' => esc_html__( 'Footer Menu', 'book-landing-page' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * Enable support for Post Formats. * See https://developer.wordpress.org/themes/functionality/post-formats/ */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat' ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'book_landing_page_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Custom Image Size add_image_size( 'book-landing-page-blog', 750, 500, true ); add_image_size( 'book-landing-page-with-sidebar', 750, 500, true ); add_image_size( 'book-landing-page-without-sidebar', 1110, 500, true ); add_image_size( 'book-landing-page-featured-post', 337, 226, true ); add_image_size( 'book-landing-page-recent-post', 70, 70, true ); add_image_size( 'book-landing-page-search-thumbnail',230,158,true ); add_image_size( 'book-landing-page-banner',1349,699,true ); add_image_size( 'book-landing-page-promotional-block', 230,230,true ); add_image_size( 'book-landing-page-about-block' , 75,75,true ); add_image_size( 'book-landing-page-testimonial-block', 68, 68, true ); } endif; add_action( 'after_setup_theme', 'book_landing_page_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function book_landing_page_content_width() { $GLOBALS['content_width'] = apply_filters( 'book_landing_page_content_width', 640 ); } add_action( 'after_setup_theme', 'book_landing_page_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function book_landing_page_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Right Sidebar', 'book-landing-page' ), 'id' => 'right-sidebar', 'description' => esc_html__( 'Add widgets here.', 'book-landing-page' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer Menu Widget', 'book-landing-page' ), 'id' => 'footer-widget', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Bottom Suscriber Widget', 'book-landing-page' ), 'id' => 'bottom-widget', 'description' => '', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'book_landing_page_widgets_init' ); /** * Enqueue scripts and styles. */ function book_landing_page_scripts() { wp_enqueue_style( 'book-landing-page-jcf', get_template_directory_uri() . '/css/jcf.css' ); wp_enqueue_style( 'book-landing-page-sidr-style', get_template_directory_uri() . '/css/jquery.sidr.light.css' ); wp_enqueue_style( 'book-landing-page-font-awesome', get_template_directory_uri() . '/css/font-awesome.css' ); wp_enqueue_style( 'book-landing-page-style', get_stylesheet_uri() ); wp_enqueue_script( 'book-landing-page-tab', get_template_directory_uri() . '/js/tab.js', array('jquery'), '20160125', true ); wp_enqueue_script( 'book-landing-page-nice-scroll', get_template_directory_uri() . '/js/nice-scroll.js', array('jquery'), '2.0.3', true ); wp_enqueue_script( 'book-landing-page-equalheights', get_template_directory_uri() . '/js/jquery.equalheights.js', array('jquery'), '1.0', true ); wp_enqueue_script( 'book-landing-page-sidr', get_template_directory_uri() . '/js/jquery.sidr.js', array('jquery'), '20160125', true ); wp_enqueue_script( 'book-landing-page-custom', get_template_directory_uri() . '/js/custom.js', '20160125', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'book_landing_page_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/book-landing-page-custom-functions.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; /** * Load plugin for right and no sidebar */ require get_template_directory() . '/inc/book-landing-page-metabox.php'; /** * Load widget featured post. */ require get_template_directory() . '/inc/widget-featured-post.php'; /** * Load widget recent post. */ require get_template_directory() . '/inc/widget-recent-post.php'; /** * Load widget social link. */ require get_template_directory() . '/inc/widget-social-links.php';