/** * Bosa works in WordPress 5.0 or later. */ if ( version_compare( $GLOBALS['wp_version'], '5.0', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; return; } /** * Bosa functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package Bosa */ if ( ! function_exists( 'bosa_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function bosa_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on Bosa, use a find and replace * to change 'bosa' to the name of your theme in all the template files. */ load_theme_textdomain( 'bosa', 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. * By adding theme support, we declare that this theme does not use a * hard-coded 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 one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Primary', 'bosa' ), 'menu-3' => esc_html__( 'Secondary', 'bosa' ), 'menu-2' => esc_html__( 'Footer', 'bosa' ), 'menu-4' => esc_html__( 'Category Menu', 'bosa' ), ) ); /* * 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', ) ); /** * Add support for Post Formats. * * @link https://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats' , array( 'aside', 'gallery' , 'standard', 'link', 'image' , 'quote', 'status', 'video', 'audio' , 'chat' )); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'width' => 270, 'height' => 80, 'flex-height' => true, 'flex-width' => true, ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); // Add support for woocommerce. add_theme_support( 'woocommerce' ); // Add custom image size. add_image_size( 'bosa-1920-550', 1920, 550, true ); add_image_size( 'bosa-1370-550', 1370, 550, true ); add_image_size( 'bosa-730-90', 730, 90, true ); add_image_size( 'bosa-590-310', 590, 310, true ); add_image_size( 'bosa-420-380', 420, 380, true ); add_image_size( 'bosa-420-300', 420, 300, true ); add_image_size( 'bosa-420-200', 420, 200, true ); add_image_size( 'bosa-290-150', 290, 150, true ); add_image_size( 'bosa-80-60', 80, 60, true ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style( array( '/assets/css/editor-style.min.css') ); // Gutenberg support add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Tan', 'bosa' ), 'slug' => 'tan', 'color' => '#D2B48C', ), array( 'name' => esc_html__( 'Yellow', 'bosa' ), 'slug' => 'yellow', 'color' => '#FDE64B', ), array( 'name' => esc_html__( 'Orange', 'bosa' ), 'slug' => 'orange', 'color' => '#ED7014', ), array( 'name' => esc_html__( 'Red', 'bosa' ), 'slug' => 'red', 'color' => '#D0312D', ), array( 'name' => esc_html__( 'Pink', 'bosa' ), 'slug' => 'pink', 'color' => '#b565a7', ), array( 'name' => esc_html__( 'Purple', 'bosa' ), 'slug' => 'purple', 'color' => '#A32CC4', ), array( 'name' => esc_html__( 'Blue', 'bosa' ), 'slug' => 'blue', 'color' => '#4E97D8', ), array( 'name' => esc_html__( 'Green', 'bosa' ), 'slug' => 'green', 'color' => '#00B294', ), array( 'name' => esc_html__( 'Brown', 'bosa' ), 'slug' => 'brown', 'color' => '#231709', ), array( 'name' => esc_html__( 'Grey', 'bosa' ), 'slug' => 'grey', 'color' => '#7D7D7D', ), array( 'name' => esc_html__( 'Black', 'bosa' ), 'slug' => 'black', 'color' => '#000000', ), )); add_theme_support( 'align-wide' ); add_theme_support( 'editor-font-sizes', array( array( 'name' => esc_html__( 'small', 'bosa' ), 'shortName' => esc_html__( 'S', 'bosa' ), 'size' => 12, 'slug' => 'small' ), array( 'name' => esc_html__( 'regular', 'bosa' ), 'shortName' => esc_html__( 'M', 'bosa' ), 'size' => 16, 'slug' => 'regular' ), array( 'name' => esc_html__( 'larger', 'bosa' ), 'shortName' => esc_html__( 'L', 'bosa' ), 'size' => 36, 'slug' => 'larger' ), array( 'name' => esc_html__( 'huge', 'bosa' ), 'shortName' => esc_html__( 'XL', 'bosa' ), 'size' => 48, 'slug' => 'huge' ) )); add_theme_support( 'editor-styles' ); add_theme_support( 'wp-block-styles' ); /* woocommerce support */ add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } endif; add_action( 'after_setup_theme', 'bosa_setup' ); /** * Enqueue scripts and styles. */ function bosa_scripts() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css' ); if ( is_rtl() ){ wp_enqueue_style( 'bootstrap-rtl', get_template_directory_uri() . '/assets/bootstrap/css/rtl/bootstrap.min.css' ); } wp_enqueue_style( 'slick', get_template_directory_uri() . '/assets/slick/slick.css' ); wp_enqueue_style( 'slicknav', get_template_directory_uri() . '/assets/css/slicknav.min.css' ); wp_enqueue_style( 'slick-theme', get_template_directory_uri() . '/assets/slick/slick-theme.css' ); wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/assets/font-awesome/css/all.min.css' ); wp_enqueue_style( 'bosa-blocks', get_template_directory_uri() . '/assets/css/blocks.min.css' ); wp_enqueue_style( 'bosa-style', get_stylesheet_uri() ); wp_enqueue_style( 'bosa-google-font', 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700,800|Poppins:300,400,400i,500,600,700,800,900&display=swap', false ); $scripts = array( array( 'id' => 'bootstrap', 'url' => get_template_directory_uri() . '/assets/bootstrap/js/bootstrap.min.js', 'footer' => true ), array( 'id' => 'slick', 'url' => get_template_directory_uri() . '/assets/slick/slick.min.js', 'footer' => true ), array( 'id' => 'slicknav', 'url' => get_template_directory_uri() . '/assets/js/jquery.slicknav.min.js', 'footer' => true ), array( 'id' => 'bosa-skip-link-focus-fix', 'url' => get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', 'footer' => true ), array( 'id' => 'bosa-navigation', 'url' => get_template_directory_uri() . '/assets/js/navigation.js', 'footer' => true ), array( 'id' => 'theia-sticky-sidebar', 'url' => get_template_directory_uri() . '/assets/js/theia-sticky-sidebar.min.js', 'footer' => true ), array( 'id' => 'html5shiv', 'url' => get_template_directory_uri() . '/assets/js/html5shiv.min.js', 'footer' => true ), array( 'id' => 'bosa-custom', 'url' => get_template_directory_uri() . '/assets/js/custom.min.js', 'footer' => true ) ); bosa_add_scripts( $scripts ); $locale = array( 'is_rtl' => is_rtl(), 'is_admin_bar_showing' => is_admin_bar_showing() ? true : false, 'responsive_header_menu_text' => get_theme_mod( 'responsive_header_menu_text', 'MENU' ), 'header_image_slider' => array( 'fade' => absint( get_theme_mod( 'header_slider_effect', 'fade' ) == 'fade' ) ? true : false, 'autoplay' => absint( !get_theme_mod( 'disable_header_slider_autoplay', true ) ), 'autoplaySpeed' => absint( get_theme_mod( 'slider_header_autoplay_speed', 4 ) * 1000 ), 'fadeControl' => absint( get_theme_mod( 'slider_header_fade_control', 5 ) ) * 100, ), 'main_slider' => array( 'fade' => absint( get_theme_mod( 'main_slider_effect', 'fade' ) == 'fade' ) ? true : false, 'autoplay' => absint( !get_theme_mod( 'disable_slider_autoplay', true ) ), 'autoplaySpeed' => absint( get_theme_mod( 'slider_autoplay_speed', 4 ) * 1000 ), 'fadeControl' => absint( get_theme_mod( 'slider_fade_control', 5 ) ) * 100, ), 'home_highlight_posts' => array( 'autoplay' => absint( !get_theme_mod( 'disable_highlight_posts_autoplay', true ) ), 'autoplaySpeed' => absint( get_theme_mod( 'highlight_posts_autoplay_speed', 4 ) * 1000 ), 'slidesToShow' => absint( get_theme_mod( 'highlight_posts_slides_show', 3 ) ), ), 'fixed_nav' => !get_theme_mod( 'disable_fixed_header', true ) ? true : false, 'mobile_fixed_nav_off' => get_theme_mod( 'disable_mobile_fixed_header', true ) ? true : false, 'disable_scroll_top' => get_theme_mod( 'disable_scroll_top', false ), 'sticky_sidebar' => !get_theme_mod( 'disable_sticky_sidebar', false ) ? true : false, 'header_two_logo' => wp_get_attachment_url( get_theme_mod( 'header_separate_logo', '' ) ), 'is_header_two' => ( get_theme_mod( 'header_layout', 'header_one' ) == 'header_two' ) ? true : false, 'is_frame_layout' => ( get_theme_mod( 'site_layout', 'default' ) == 'frame' ) ? true : false, 'fixed_header_logo' => !get_theme_mod( 'disable_fixed_header_logo', false ) ? true : false, 'separate_logo' => wp_get_attachment_url( get_theme_mod( 'fixed_header_separate_logo', '' ) ), 'is_front_page' => is_front_page(), 'overlay_post' => ( !get_theme_mod( 'disable_transparent_header_post', true ) && is_single() ), 'overlay_page' => ( !get_theme_mod( 'disable_transparent_header_page', true ) && is_page() ), 'the_custom_logo' => bosa_get_custom_logo_url(), ); $locale = apply_filters( 'bosa_localize_var', $locale ); wp_localize_script( 'bosa-custom', 'BOSA', $locale ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'bosa_scripts' ); /** * Add script * * @since Bosa 1.0.0 */ function bosa_add_scripts( $scripts ){ foreach ( $scripts as $key => $value ) { wp_enqueue_script( $value['id'] , $value['url'] , array( 'jquery', 'jquery-masonry' ), 0.8, $value['footer'] ); } } /** * Descriptions on Primary Menu */ function bosa_header_menu_desc($item_output, $item, $depth, $args){ if ( 'menu-1' == $args->theme_location && $item->description ) $item_output = str_replace( '</a>', '<span class="menu-description">' . $item->description . '</span></a>', $item_output ); return $item_output; } add_filter( 'walker_nav_menu_start_el', 'bosa_header_menu_desc', 10, 4 ); /** * Bosa: Excerpt * * @since Bosa 1.0.0 */ if( ! class_exists( 'Bosa_Excerpt' ) ): class Bosa_Excerpt{ /** * Default length (by WordPress) * * @since Bosa 1.0.0 * @access public * @var int */ public $length = 15; /** * Read more Text for excerpt * @since Bosa 1.0.0 * @access public * @var string */ public $more_text = ''; /** * So you can call: bosa_excerpt( 'short' ); * * @since Bosa 1.0.0 * @access protected * @var array */ protected $types = array( 'short' => 15, 'regular' => 25, 'long' => 55 ); /** * Stores class instance * * @since Bosa 1.0.0 * @access protected * @var object */ protected static $instance = NULL; /** * Retrives the instance of this class * * @since Bosa 1.0.0 * @access public * @return object */ public static function get_instance() { if ( ! self::$instance ) { self::$instance = new self(); } return self::$instance; } /** * Sets the length for the excerpt,then it adds the WP filter * And automatically calls the_excerpt(); * * @since Bosa 1.0.0 * @param string $new_length * @access public * @return void */ public function excerpt( $echo, $more_text, $new_length = 15 ) { $this->length = $new_length; $this->more_text = $more_text; if(!is_admin()): add_filter( 'excerpt_more', array( $this, 'new_excerpt_more' ), 999 ); add_filter( 'excerpt_length', array( $this, 'new_length' ), 999 ); endif; if( $echo ) the_excerpt(); else return get_the_excerpt(); } public function new_excerpt_more(){ return $this->more_text; } /** * Tells WP the new length * * @since Bosa 1.0.0 * @access public * @return int */ public function new_length() { if( isset( $this->types[ $this->length ] ) ) return $this->types[ $this->length ]; else return $this->length; } } endif; /** * Call to Bosa_Excerpt * * @since 1.0.0 * @uses Bosa_Excerpt:::get_instance()->excerpt() * @param int $length * @return void */ if( ! function_exists( 'bosa_excerpt' ) ): function bosa_excerpt( $length = 15, $echo = true, $more = '' ) { $length = apply_filters( 'post_excerpt_length', $length ); $excerpt = Bosa_Excerpt::get_instance()->excerpt( false, $more, $length ); the_excerpt(); } endif; /** * Enqueue editor styles for Gutenberg * * @since Bosa 1.0.0 */ function bosa_block_editor_styles() { // Block styles. wp_enqueue_style( 'bosa-block-editor-style', get_theme_file_uri( '/assets/css/editor-blocks.min.css' ) ); // Google Font wp_enqueue_style( 'bosa-google-font', 'https://fonts.googleapis.com/css?family=Poppins:300,400,400i,500,600,700,700i', false ); } add_action( 'enqueue_block_editor_assets', 'bosa_block_editor_styles' ); /** * 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'; /** * Functions for Woocommerce features */ require get_template_directory() . '/inc/woocommerce-functions.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer/customizer.php'; /** * Dynamic CSS. */ require get_template_directory() . '/inc/customizer/loader.php'; /** * Widgets. */ require get_template_directory() . '/inc/widgets/loader.php'; /** * Getting Started Notification. */ require get_theme_file_path( '/inc/getting-started/getting-started.php' ); /** * Theme Info. */ function bosa_theme_info_load() { require get_theme_file_path( '/inc/theme-info/theme-info.php' ); } add_action( 'init', 'bosa_theme_info_load' ); /** * Load Jetpack compatibility file. */ if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; } /** * Disable Getting Start After activating Elementor. */ add_action( 'admin_init', function() { if ( did_action( 'elementor/loaded' ) ) { remove_action( 'admin_init', [ \Elementor\Plugin::$instance->admin, 'maybe_redirect_to_getting_started' ] ); } }, 1 );<!doctype html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="profile" href="https://gmpg.org/xfn/11"> <meta name='robots' content='max-image-preview:large' /> <link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://nnm.co.ke/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fnnm.co.ke%2F" /> <link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://nnm.co.ke/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fnnm.co.ke%2F&format=xml" /> <style id='wp-img-auto-sizes-contain-inline-css' type='text/css'> img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px} /*# sourceURL=wp-img-auto-sizes-contain-inline-css */ </style> <style id='wp-emoji-styles-inline-css' type='text/css'> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 0.07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } /*# sourceURL=wp-emoji-styles-inline-css */ </style> <style id='wp-block-library-inline-css' type='text/css'> :root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}} /*# sourceURL=wp-block-library-inline-css */ </style> <style id='classic-theme-styles-inline-css' type='text/css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} /*# sourceURL=/wp-includes/css/classic-themes.min.css */ </style> <link rel="https://api.w.org/" href="https://nnm.co.ke/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://nnm.co.ke/wp-json/wp/v2/pages/681" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://nnm.co.ke/xmlrpc.php?rsd" /> <meta name="generator" content="WordPress 6.9.1" /> <link rel="canonical" href="https://nnm.co.ke/" /> <link rel='shortlink' href='https://nnm.co.ke/' /> <link rel="icon" href="https://nnm.co.ke/wp-content/uploads/2022/06/cropped-243919598_110248828088606_8872341274775297600_n-1-2-32x32.jpg" sizes="32x32" /> <link rel="icon" href="https://nnm.co.ke/wp-content/uploads/2022/06/cropped-243919598_110248828088606_8872341274775297600_n-1-2-192x192.jpg" sizes="192x192" /> <link rel="apple-touch-icon" href="https://nnm.co.ke/wp-content/uploads/2022/06/cropped-243919598_110248828088606_8872341274775297600_n-1-2-180x180.jpg" /> <meta name="msapplication-TileImage" content="https://nnm.co.ke/wp-content/uploads/2022/06/cropped-243919598_110248828088606_8872341274775297600_n-1-2-270x270.jpg" /> </head> <body class="home wp-singular page-template page-template-elementor_canvas page page-id-681 wp-custom-logo wp-theme-bosa"> <div id="site-preloader"> <div class="preloader-content"> <img src="https://nnm.co.ke/wp-content/themes/bosa/assets/images/preloader1.gif" alt=""> </div> </div> <div id="page" class="site"> <a class="skip-link screen-reader-text" href="#content">Skip to content</a> <header id="masthead" class="site-header header-one"> <div class="top-header">