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' );
// This theme uses wp_nav_menu() in header and footer locations.
register_nav_menus(
array(
'business-ai-primary' => esc_html__( 'Primary Menu', 'business-ai' ),
'business-ai-footer-1' => esc_html__( 'Footer Services', 'business-ai' ),
'business-ai-footer-2' => esc_html__( 'Footer Company', 'business-ai' ),
'business-ai-footer-3' => esc_html__( 'Footer Resources', 'business-ai' ),
)
);
/*
* 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',
)
);
// 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
*/
add_theme_support(
'custom-logo',
array(
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
)
);
// Block Editor support.
add_theme_support( 'wp-block-styles' );
add_theme_support( 'editor-styles' );
add_theme_support( 'align-wide' );
add_theme_support( 'responsive-embeds' );
add_theme_support( 'custom-background', array(
'default-color' => 'ffffff',
) );
add_editor_style( 'editor-style.css' );
// Starter Content - sets up the custom homepage by default.
add_theme_support( 'starter-content', array(
'posts' => array(
'home',
'blog',
),
'options' => array(
'show_on_front' => 'page',
'page_on_front' => '{{home}}',
'page_for_posts' => '{{blog}}',
),
'nav_menus' => array(
'business-ai-primary' => array(
'name' => __( 'Primary Menu', 'business-ai' ),
'items' => array(
'page_home',
'page_blog',
),
),
),
) );
}
add_action( 'after_setup_theme', 'business_ai_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 business_ai_content_width() {
$GLOBALS['content_width'] = apply_filters( 'business_ai_content_width', 640 );
}
add_action( 'after_setup_theme', 'business_ai_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function business_ai_widgets_init() {
register_sidebar(
array(
'name' => esc_html__( 'Sidebar', 'business-ai' ),
'id' => 'business-ai-sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'business-ai' ),
'before_widget' => '',
'before_title' => '
',
)
);
}
add_action( 'widgets_init', 'business_ai_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function business_ai_scripts() {
wp_enqueue_style( 'business-ai-google-fonts', 'https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap', array(), null );
wp_enqueue_style( 'business-ai-style', get_stylesheet_uri(), array( 'business-ai-google-fonts' ), BUSINESS_AI_VERSION );
wp_style_add_data( 'business-ai-style', 'rtl', 'replace' );
wp_enqueue_script( 'business-ai-navigation', get_template_directory_uri() . '/js/navigation.js', array(), BUSINESS_AI_VERSION, true );
wp_enqueue_script( 'business-ai-faq', get_template_directory_uri() . '/js/faq.js', array(), BUSINESS_AI_VERSION, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'business_ai_scripts' );
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Functions which enhance the theme by hooking into WordPress.
*/
require get_template_directory() . '/inc/template-functions.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
if ( defined( 'JETPACK__VERSION' ) ) {
require get_template_directory() . '/inc/jetpack.php';
}
/**
* Load TGM Plugin Activation library.
*/
require get_template_directory() . '/inc/class-tgm-plugin-activation.php';
/**
* Load recommended plugins.
*/
require get_template_directory() . '/inc/recommended-plugins.php';
/**
* Primary menu fallback.
*/
function business_ai_primary_menu_fallback() {
$nav_defaults = array(
1 => array( 'text' => __( 'Lorem', 'business-ai' ), 'url' => '#services' ),
2 => array( 'text' => __( 'Ipsum', 'business-ai' ), 'url' => '#about' ),
3 => array( 'text' => __( 'Dolor', 'business-ai' ), 'url' => '#testimonials' ),
4 => array( 'text' => __( 'Sit Amet', 'business-ai' ), 'url' => '#pricing' ),
5 => array( 'text' => __( 'Consectetur', 'business-ai' ), 'url' => '#faq' ),
);
?>
array( 'text' => __( 'Lorem', 'business-ai' ), 'url' => '#services' ),
2 => array( 'text' => __( 'Ipsum', 'business-ai' ), 'url' => '#about' ),
3 => array( 'text' => __( 'Dolor', 'business-ai' ), 'url' => '#testimonials' ),
4 => array( 'text' => __( 'Sit Amet', 'business-ai' ), 'url' => '#pricing' ),
5 => array( 'text' => __( 'Consectetur', 'business-ai' ), 'url' => '#faq' ),
);
?>
array( 'text' => __( 'Lorem Ipsum', 'business-ai' ), 'url' => '#' ),
2 => array( 'text' => __( 'Dolor Sit', 'business-ai' ), 'url' => '#' ),
3 => array( 'text' => __( 'Amet Consectetur', 'business-ai' ), 'url' => '#' ),
4 => array( 'text' => __( 'Adipiscing Elit', 'business-ai' ), 'url' => '#' ),
);
?>
array( 'text' => __( 'Sed Do', 'business-ai' ), 'url' => '#' ),
2 => array( 'text' => __( 'Eiusmod', 'business-ai' ), 'url' => '#' ),
3 => array( 'text' => __( 'Tempor', 'business-ai' ), 'url' => '#' ),
4 => array( 'text' => __( 'Incididunt', 'business-ai' ), 'url' => '#' ),
);
?>
array( 'text' => __( 'Ut Labore', 'business-ai' ), 'url' => '#' ),
2 => array( 'text' => __( 'Et Dolore', 'business-ai' ), 'url' => '#' ),
3 => array( 'text' => __( 'Magna Aliqua', 'business-ai' ), 'url' => '#' ),
4 => array( 'text' => __( 'Veniam', 'business-ai' ), 'url' => '#' ),
);
?>