// Sets up theme defaults and registers support for various WordPress features. function octavian_theme_setup() { // Make theme available for translation. load_theme_textdomain( 'octavian', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); // Let WordPress manage the document title. add_theme_support( 'title-tag' ); // Custom background color. add_theme_support( 'custom-background' ); // Custom Header add_theme_support( 'custom-header' ); // Enable woocommerce support add_theme_support( 'woocommerce' ); // Enable support for Post Thumbnails on posts and pages. add_theme_support( 'post-thumbnails' ); add_image_size( 'octavian-post-standard', 1170, 570, true ); add_image_size( 'octavian-post-widget', 170, 170, true ); // Register menus register_nav_menu( 'primary', esc_html__( 'Primary Menu', 'octavian' ) ); register_nav_menu( 'secondary', esc_html__( 'Secondary Menu', 'octavian' ) ); register_nav_menu( 'onepage', esc_html__( 'Onepage Menu', 'octavian' ) ); // 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. add_theme_support( 'post-formats', array( 'image', 'gallery', 'video' ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style( array( 'assets/css/editor-style.css' ) ); } add_action( 'after_setup_theme', 'octavian_theme_setup' ); // Enqueues scripts and styles. function octavian_theme_scripts() { // Vendor Styles & Icons wp_enqueue_style( 'animate', get_template_directory_uri() . '/assets/css/animate.css', array(), '3.5.2' ); wp_enqueue_style( 'animsition', get_template_directory_uri() . '/assets/css/animsition.css', array(), '4.0.1' ); wp_enqueue_style( 'slick', get_template_directory_uri() . '/assets/css/slick.css', array(), '1.6.0' ); wp_enqueue_style( 'eleganticons', get_template_directory_uri() . '/assets/css/eleganticons.css', array(), '1.0.0' ); wp_enqueue_style( 'pe-icon-7-stroke', get_template_directory_uri() . '/assets/css/pe-icon-7-stroke.css', array(), '1.0.0' ); wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/assets/css/fontawesome.css', array(), '5.13.0' ); // Theme Style wp_enqueue_style( 'octavian-theme-style', get_stylesheet_uri(), array(), '1.0.0' ); wp_add_inline_style( 'octavian-theme-style', apply_filters( 'octavian_custom_colors_css', null ) ); // Vendor Scripts wp_enqueue_script( 'html5shiv', get_template_directory_uri() . '/assets/js/html5shiv.js', array('jquery'), '3.7.3', true ); wp_enqueue_script( 'respond', get_template_directory_uri() . '/assets/js/respond.js', array('jquery'), '1.3.0', true ); wp_enqueue_script( 'matchmedia', get_template_directory_uri() . '/assets/js/matchmedia.js', array('jquery'), '1.0.0', true ); wp_enqueue_script( 'easing', get_template_directory_uri() . '/assets/js/easing.js', array('jquery'), '1.3.0', true ); wp_enqueue_script( 'fitvids', get_template_directory_uri() . '/assets/js/fitvids.js', array('jquery'), '1.1.0', true ); wp_enqueue_script( 'animsition', get_template_directory_uri() . '/assets/js/animsition.js', array('jquery'), '4.0.1', true ); wp_register_script( 'slick', get_template_directory_uri() . '/assets/js/slick.js', array('jquery'), '1.6.0', true ); // Theme Script wp_enqueue_script( 'octavian-theme-script', get_template_directory_uri() . '/assets/js/main.js', array( 'jquery' ), '1.0.0', true ); // Comment JS if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'octavian_theme_scripts' ); // Registers a widget areas. function octavian_sidebars_init() { // Sidebar for Blog register_sidebar( array( 'name' => esc_html__( 'Sidebar Blog', 'octavian' ), 'id' => 'sidebar-blog', 'description' => esc_html__( 'Add widgets here to appear in Sidebar Blog.', 'octavian' ), 'before_widget' => '
', 'before_title' => '