/**
* Techwind functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Techwind
*/
if( is_admin() ) {
require get_template_directory() . '/inc/backend/nav-menus.php';
} else {
require get_template_directory() . '/inc/backend/menu-walker.php';
}
if ( ! function_exists( 'techwind_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 techwind_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on _s, use a find and replace
* to change 'techwind' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'techwind', 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(
'primary' => esc_html__( 'Primary', 'techwind' ),
'onepage' => esc_html__( 'Onepage', 'techwind' ),
) );
if( is_admin() ) {
new techwind_Walker_Nav_Menu_Custom_Fields;
}
/*
* 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',
) );
/*
* Enable support for Post Formats.
*
* See: https://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'image',
'video',
'quote',
'gallery',
'audio',
) );
/* Add image sizes */
add_image_size( 'techwind-portfolio-thumbnail-grid', 500, 500, array( 'center', 'center' ) );
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, and column width.
*/
add_editor_style( array( 'css/editor-style.css', techwind_fonts_url() ) );
}
endif;
add_action( 'after_setup_theme', 'techwind_setup' );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function techwind_widgets_init() {
/* Register the 'primary' sidebar. */
register_sidebar( array(
'name' => esc_html__( 'Primary Sidebar', 'techwind' ),
'id' => 'primary',
'description' => esc_html__( 'Add widgets here.', 'techwind' ),
'before_widget' => '',
'before_title' => '',
) );
/* Repeat register_sidebar() code for additional sidebars. */
register_sidebar( array(
'name' => esc_html__( 'Footer First Widget Area', 'techwind' ),
'id' => 'footer-area-1',
'description' => esc_html__( 'Add widgets here to appear in your footer.', 'techwind' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Second Widget Area', 'techwind' ),
'id' => 'footer-area-2',
'description' => esc_html__( 'Add widgets here to appear in your footer.', 'techwind' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Third Widget Area', 'techwind' ),
'id' => 'footer-area-3',
'description' => esc_html__( 'Add widgets here to appear in your footer.', 'techwind' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Fourth Widget Area', 'techwind' ),
'id' => 'footer-area-4',
'description' => esc_html__( 'Add widgets here to appear in your footer.', 'techwind' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'techwind_widgets_init' );
/**
* Register custom fonts.
*/
if ( ! function_exists( 'techwind_fonts_url' ) ) :
/**
* Register Google fonts for Blessing.
*
* Create your own techwind_fonts_url() function to override in a child theme.
*
* @since Blessing 1.0
*
* @return string Google fonts URL for the theme.
*/
function techwind_fonts_url() {
$fonts_url = '';
$font_families = array();
$subsets = 'latin,latin-ext';
/* translators: If there are characters in your language that are not supported by Nunito, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Nunito font: on or off', 'techwind' ) ) {
$font_families[] = 'Nunito:300,400,500,600,700';
}
/* translators: If there are characters in your language that are not supported by Lexend, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Lexend font: on or off', 'techwind' ) ) {
$font_families[] = 'Lexend:200;300;400;500';
}
if ( $font_families ) {
$fonts_url = add_query_arg( array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( $subsets ),
), 'https://fonts.googleapis.com/css' );
}
return esc_url_raw( $fonts_url );
}
endif;
/**
* Enqueue scripts and styles.
*/
function techwind_scripts() {
// Add custom fonts, used in the main stylesheet.
wp_enqueue_style( 'techwind-fonts', techwind_fonts_url(), array(), null );
/** All frontend css files **/
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '4.0', 'all');
/** Owl slider **/
wp_enqueue_style( 'owl-slider', get_template_directory_uri().'/css/owl.carousel.min.css');
/** Lightgallery Popup **/
wp_enqueue_style( 'lightgallery', get_template_directory_uri().'/css/lightgallery.css');
/** Theme stylesheet. **/
wp_enqueue_style( 'techwind-style', get_stylesheet_uri() );
if( techwind_get_option( 'preload' ) != false ){
wp_enqueue_script('techwind-royal-preloader', get_template_directory_uri()."/js/royal_preloader.min.js",array('jquery'), '1.0', true);
}
wp_enqueue_script( 'isotope', get_template_directory_uri().'/js/jquery.isotope.min.js', array('jquery'), '20180910', true );
wp_enqueue_script( 'lightgallery', get_template_directory_uri() . '/js/lightgallery-all.min.js', array( 'jquery' ), '20180910', true );
wp_enqueue_script( 'jarallax', get_template_directory_uri() . '/js/jarallax.min.js', array( 'jquery' ), '20180910', true );
wp_enqueue_script( 'owl-slider', get_template_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), '20180910', true );
wp_enqueue_script( 'easypiechart', get_template_directory_uri() . '/js/easypiechart.min.js', array( 'jquery' ), '20190829', true );
wp_enqueue_script( 'techwind-elementor', get_template_directory_uri() . '/js/elementor.js', array( 'jquery' ), '20180910', true );
wp_enqueue_script( 'techwind-elementor-header', get_template_directory_uri() . '/js/elementor-header.js', array('jquery'), '20180910', true );
wp_enqueue_script( 'countdown', get_template_directory_uri() . '/js/jquery.countdown.min.js', array( 'jquery' ), '20180910', true );
wp_enqueue_script( 'techwind-scripts', get_template_directory_uri() . '/js/scripts.js', array( 'jquery' ), '20180910', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'techwind_scripts' );
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/frontend/template-tags.php';
/**
* Functions which enhance the theme by hooking into WordPress.
*/
require get_template_directory() . '/inc/frontend/template-functions.php';
/**
* Custom Page Header for this theme.
*/
require get_template_directory() . '/inc/frontend/page-header/breadcrumbs.php';
require get_template_directory() . '/inc/frontend/page-header/page-header.php';
/**
* Functions which add more to backend.
*/
require get_template_directory() . '/inc/backend/admin-functions.php';
/**
* Custom metabox for this theme.
*/
require get_template_directory() . '/inc/backend/meta-boxes.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/backend/customizer/customizer.php';
/**
* Preloader js & css
*/
require get_template_directory() . '/inc/frontend/preloader.php';
/**
* Register the required plugins for this theme.
*/
require get_template_directory() . '/inc/backend/plugin-requires.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/backend/color.php';
/**
* importer.
*/
require get_template_directory() . '/inc/backend/importer.php';
/**
* Customizer Menu.
*/
require_once get_template_directory() . '/inc/backend/wp_bootstrap_navwalker.php';
/**
* Elementor functions.
*/
require get_template_directory() . '/inc/backend/elementor/elementor.php';
require get_template_directory() . '/inc/frontend/builder.php';
/**
* Load WooCommerce compatibility file.
*/
if ( class_exists( 'woocommerce' ) ) {
require get_template_directory() . '/inc/woocommerce/woocommerce.php';
}
https://ethiliaaustin.co.za/wp-sitemap-posts-post-1.xmlhttps://ethiliaaustin.co.za/wp-sitemap-posts-page-1.xmlhttps://ethiliaaustin.co.za/wp-sitemap-posts-ot_portfolio-1.xmlhttps://ethiliaaustin.co.za/wp-sitemap-taxonomies-category-1.xmlhttps://ethiliaaustin.co.za/wp-sitemap-taxonomies-post_format-1.xmlhttps://ethiliaaustin.co.za/wp-sitemap-taxonomies-portfolio_cat-1.xmlhttps://ethiliaaustin.co.za/wp-sitemap-users-1.xml