/** * Ophiro Ventures Theme Functions * * @package Ophiro_Ventures * @version 1.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } define( 'OPHIRO_VERSION', '1.0.0' ); define( 'OPHIRO_DIR', get_template_directory() ); define( 'OPHIRO_URI', get_template_directory_uri() ); /** * Include modular theme files. */ require OPHIRO_DIR . '/inc/custom-post-types.php'; require OPHIRO_DIR . '/inc/enqueue.php'; require OPHIRO_DIR . '/inc/customizer.php'; require OPHIRO_DIR . '/inc/template-tags.php'; require OPHIRO_DIR . '/inc/widgets.php'; /** * Theme Setup */ function ophiro_setup() { load_theme_textdomain( 'ophiro', OPHIRO_DIR . '/languages' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', ) ); add_theme_support( 'customize-selective-refresh-widgets' ); add_theme_support( 'custom-logo', array( 'height' => 60, 'width' => 200, 'flex-height' => true, 'flex-width' => true, ) ); add_theme_support( 'editor-styles' ); // Image sizes for luxury layouts add_image_size( 'ophiro-hero', 1920, 1080, true ); add_image_size( 'ophiro-card', 800, 500, true ); add_image_size( 'ophiro-thumb', 400, 300, true ); add_image_size( 'ophiro-gallery', 1200, 800, true ); // Navigation menus register_nav_menus( array( 'primary' => esc_html__( 'Primary Navigation', 'ophiro' ), 'footer' => esc_html__( 'Footer Navigation', 'ophiro' ), ) ); } add_action( 'after_setup_theme', 'ophiro_setup' ); /** * Content width */ function ophiro_content_width() { $GLOBALS['content_width'] = apply_filters( 'ophiro_content_width', 1400 ); } add_action( 'after_setup_theme', 'ophiro_content_width', 0 ); /** * Register widget areas */ function ophiro_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'ophiro' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'ophiro' ), 'before_widget' => '', 'before_title' => '