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' ); // Register navigation menus. register_nav_menus( array( 'best_minimal_restaurant_main_menu' => esc_html__( 'Main Menu', 'best-minimal-restaurant' ), 'best_minimal_restaurant_footer_menu' => esc_html__( 'Footer Menu', 'best-minimal-restaurant' ), ) ); /* * 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', 'style', 'script', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'best_minimal_restaurant_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /* * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ $logo_width = 300; $logo_height = 100; add_theme_support( 'custom-logo', array( 'height' => $logo_height, 'width' => $logo_width, 'flex-width' => true, 'flex-height' => true, 'unlink-homepage-logo' => true, ) ); /* * Adds starter content to highlight the theme on fresh sites. * This is done conditionally to avoid loading the starter content on every * page load, as it is a one-off operation only needed once in the customizer. */ if ( is_customize_preview() ) { require BMR_MINIMAL_INC_DIR . 'starter-content.php'; add_theme_support( 'starter-content', best_minimal_restaurant_get_starter_content() ); } } endif; add_action( 'after_setup_theme', 'best_minimal_restaurant_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. * * @since 1.0.0 * * @global int $content_width Content width. * * @return void */ function best_minimal_restaurant_content_width() { $GLOBALS['content_width'] = apply_filters( 'best_minimal_restaurant_content_width', 1200 ); } add_action( 'after_setup_theme', 'best_minimal_restaurant_content_width', 0 ); /** * Register widget area. * * @since 1.0.0 * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function best_minimal_restaurant_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'best-minimal-restaurant' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'best-minimal-restaurant' ), 'before_widget' => '
', 'before_title' => '