/** * Foundora Noventra Theme Functions * * @package Foundora_Noventra */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'FOUNDORA_NOVENTRA_VERSION', '1.0.0' ); /** * Sets up theme defaults and registers support for various WordPress features. */ function foundora_noventra_setup() { load_theme_textdomain( 'foundora-noventra', get_template_directory() . '/languages' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); // Image sizes set_post_thumbnail_size( 1200, 675, true ); // 16:9 large add_image_size( 'foundora-featured-large', 800, 450, true ); add_image_size( 'foundora-card-thumb', 600, 375, true ); add_image_size( 'foundora-small-thumb', 300, 200, true ); // Register Navigation Menus register_nav_menus( array( 'primary' => esc_html__( 'Primary Navigation Menu', 'foundora-noventra' ), 'footer' => esc_html__( 'Footer Legal Menu', 'foundora-noventra' ), 'topbar' => esc_html__( 'Top Bar Utility Menu', 'foundora-noventra' ), ) ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', 'navigation-widgets', ) ); // Custom logo add_theme_support( 'custom-logo', array( 'height' => 90, 'width' => 300, 'flex-height' => true, 'flex-width' => true, ) ); add_theme_support( 'customize-selective-refresh-widgets' ); add_theme_support( 'responsive-embeds' ); add_theme_support( 'align-wide' ); add_theme_support( 'editor-styles' ); add_editor_style( 'assets/css/editor-style.css' ); } add_action( 'after_setup_theme', 'foundora_noventra_setup' ); /** * Set content width in pixels. */ function foundora_noventra_content_width() { $GLOBALS['content_width'] = apply_filters( 'foundora_noventra_content_width', 760 ); } add_action( 'after_setup_theme', 'foundora_noventra_content_width', 0 ); /** * Register widget area. */ function foundora_noventra_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Primary Sidebar', 'foundora-noventra' ), 'id' => 'sidebar-main', 'description' => esc_html__( 'Add widgets here to appear in your sidebar on posts and pages.', 'foundora-noventra' ), 'before_widget' => '', 'before_title' => '