• File: prinox-functions.php
  • Full Path: /home/slvgwrnz/public_html/functions/prinox-functions.php
  • Date Modified: 02/02/2025 10:15 PM
  • File size: 33.81 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

/**
 * Prinox menu Register function
 *
 * @return void
 */
function prinox_main_menu(){
    echo str_replace(['menu-item-has-children'], ['dropdown'], wp_nav_menu( array( 
        'echo'           => false,
        'theme_location' => 'primary-menu', 
        'menu_id'        =>'prinoix-primary-menu',
        'menu_class'     =>'navigation clearfix',
        'container'=>false,
        'fallback_cb'    => 'Prinox_Bootstrap_Navwalker::fallback',
        'walker'         => class_exists( 'EFramework_Mega_Menu_Walker' ) ? new EFramework_Mega_Menu_Walker : '',
    )) );	
}
function prinox_main_menu_two(){
    wp_nav_menu( array( 
        'theme_location' => 'main_menu_two', 
        'menu_id'        =>'prinoix-primary-menu',
        'menu_class'     =>'navigation clearfix',
        'container'=>false,
        'fallback_cb'    => 'Prinox_Bootstrap_Navwalker::fallback',
    ));	
}

/**
 * Prinox Cuntom Funciton
 *
 * @package Prinox
 */

function prinox_header_options(){
    if('header-style-one' === prinox_site_header()){
        get_template_part('template-parts/header/header', 'one');
    }elseif('header-style-two' === prinox_site_header()){
        get_template_part('template-parts/header/header', 'two');
    }elseif('header-style-three' === prinox_site_header()){
        get_template_part('template-parts/header/header', 'three');
    }elseif('header-style-four' === prinox_site_header()){
        get_template_part('template-parts/header/header', 'four');
    }elseif('header-style-five' === prinox_site_header()){
        get_template_part('template-parts/header/header', 'five');
    }elseif('header-style-six' === prinox_site_header()){
        get_template_part('template-parts/header/header', 'six');
    }elseif('header-style-seven' === prinox_site_header()){
        get_template_part('template-parts/header/header', 'seven');
    }else{
        get_template_part('template-parts/header/header', 'two');
    }
    
}


function prinox_header_content(){ 
    $header_btn = cs_get_option('header-btn-in');
    $phone_title = cs_get_option('phone_title');
    $phone_no = cs_get_option('phone_no');    
    $is_enable_sidebar_nav = cs_get_option('is_enable_sidebar_nav');  
    
    $phone_no_cl = '';
    if(empty($phone_no)){
        $phone_no_cl = 'no-con-info';
    }
?>
    <!-- Header Lower -->
    <div class="header-lower">
        
        <div class="auto-container">
            <div class="inner-container d-flex justify-content-between align-items-center">
                
                <div class="logo-box d-flex align-items-center">
                    <!-- Nav Btn 
                    <div class="nav-btn "><span class="icon flaticon-menu"></span></div> -->
                    <?php if('header-style-one' === prinox_site_header() && $is_enable_sidebar_nav == true):?>
                    <div class="nav-toggle-btn a-nav-toggle navSidebar-button">
                        <span class="hamburger">
                            <span class="top-bun"></span>
                            <span class="meat"></span>
                            <span class="bottom-bun"></span>
                        </span>
                    </div>
                    <?php endif;?>
                    <!-- Logo -->
                    <div class="logo"><?php prinox_logo();?></div>
                </div>
                <div class="nav-outer clearfix">
                    
                    <!-- Mobile Navigation Toggler -->
                    <div class="mobile-nav-toggler"><span class="icon flaticon-menu"></span></div>
                    <!-- Main Menu -->
                    <nav class="main-menu show navbar-expand-md">
                        <div class="navbar-header">
                            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                        </div>
                        
                        <div class="navbar-collapse collapse clearfix" id="navbarSupportedContent">
                            <?php prinox_main_menu();?>
                        </div>
                        
                    </nav>
                    <!-- Main Menu End-->
                    
                </div>
                
                <!-- Outer Box -->
                <div class="outer-box d-flex align-items-center">
                    <?php if('header-style-one' === prinox_site_header()):?>
                    <!-- Cart Box -->
                    
                    <div class="cart-box <?php echo esc_attr($phone_no_cl);?>">
                        <div class="box-inner">
                            <?php if(class_exists('Woocommerce')):?>
                            <a href="<?php echo esc_url( home_url( '/cart' ) ); ?>" class="icon-box">
                                <span class="icon flaticon-bag"></span>

                                <i class="total-cart widget_cart_counter"><?php echo sprintf (_n( '%d', '%d', WC()->cart->cart_contents_count, 'prinox' ), WC()->cart->cart_contents_count ); ?></i>                    
                                           
                            </a>
                            <?php endif;?>
                        </div>
                    </div>
                    
                    <!-- End Cart Box -->
                    <?php endif;?>
                    <?php if(!empty($header_btn['text'])):?>
                    <!-- Button Box -->
                    <div class="button-box">
                        <a href="<?php echo esc_url($header_btn['url']);?>" class="theme-btn <?php if('header-style-three' === prinox_site_header()){echo esc_attr('btn-style-two');}else{echo esc_attr('btn-style-one');}?>  clearfix">
                            <span class="btn-wrap">
                                <span class="text-one"><?php echo esc_html($header_btn['text']);?></span>
                                <span class="text-two"><?php echo esc_html($header_btn['text']);?></span>
                            </span>
                            <span class="icon flaticon-right-arrow"></span>
                        </a>
                    </div>
                    <?php endif;?>
                </div>
                <!-- End Outer Box -->
                
            </div>
            
        </div>
    </div>
    <!-- End Header Lower -->
    
    <!-- Sticky Header  -->
    <div class="sticky-header">
        <div class="auto-container d-flex justify-content-between align-items-center clearfix">
            <!-- Logo -->
            <div class="logo">
                <?php prinox_logo();?>
            </div>
            
            <!--Right Col-->
            <div class="menu-pull ml-auto">
                <!-- Main Menu -->
                <nav class="main-menu">
                    <!--Keep This Empty / Menu will come through Javascript-->
                </nav>
                <!-- Main Menu End-->
                
                <!-- Mobile Navigation Toggler -->
                <div class="mobile-nav-toggler"><span class="icon flaticon-menu"></span></div>
                
            </div>
        </div>
    </div>
    <!-- End Sticky Menu -->
      <?php prinox_mobile_menu();?>
    <!-- Mobile Menu  -->
    
    <!-- End Mobile Menu -->
<?php 
}

function prinox_header_content_two(){ 
    $header_btn = cs_get_option('header-btn-in');
    $phone_title = cs_get_option('phone_title');
    $phone_no = cs_get_option('phone_no');    
    $is_enable_sidebar_nav = cs_get_option('is_enable_sidebar_nav');  
    
    $phone_no_cl = '';
    if(empty($phone_no)){
        $phone_no_cl = 'no-con-info';
    }
?>
    <!-- Header Lower -->
    <div class="header-lower">
        
        <div class="auto-container">
            <div class="inner-container d-flex justify-content-between align-items-center">
                
                <div class="logo-box d-flex align-items-center">
                    <!-- Nav Btn 
                    <div class="nav-btn "><span class="icon flaticon-menu"></span></div> -->
                    <?php if('header-style-one' === prinox_site_header() && $is_enable_sidebar_nav == true):?>
                    <div class="nav-toggle-btn a-nav-toggle navSidebar-button">
                        <span class="hamburger">
                            <span class="top-bun"></span>
                            <span class="meat"></span>
                            <span class="bottom-bun"></span>
                        </span>
                    </div>
                    <?php endif;?>
                    <!-- Logo -->
                    <div class="logo"><?php prinox_logo();?></div>
                </div>
                <div class="nav-outer clearfix">
                    
                    <!-- Mobile Navigation Toggler -->
                    <div class="mobile-nav-toggler"><span class="icon flaticon-menu"></span></div>
                    <!-- Main Menu -->
                    <nav class="main-menu show navbar-expand-md">
                        <div class="navbar-header">
                            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                        </div>
                        
                        <div class="navbar-collapse collapse clearfix" id="navbarSupportedContent">
                            <?php prinox_main_menu();?>
                        </div>
                        
                    </nav>
                    <!-- Main Menu End-->
                    
                </div>
                
                <!-- Outer Box -->
                <div class="outer-box d-flex align-items-center">
                    <?php if('header-style-one' === prinox_site_header()):?>
                    <!-- Cart Box -->
                    
                    <div class="cart-box <?php echo esc_attr($phone_no_cl);?>">
                        <div class="box-inner">
                            <?php if(class_exists('Woocommerce')):?>
                            <a href="<?php echo esc_url( home_url( '/cart' ) ); ?>" class="icon-box">
                                <span class="icon flaticon-bag"></span>

                                <i class="total-cart widget_cart_counter"><?php echo sprintf (_n( '%d', '%d', WC()->cart->cart_contents_count, 'prinox' ), WC()->cart->cart_contents_count ); ?></i>                    
                                           
                            </a>
                            <?php endif;?>
                        </div>
                    </div>
                    
                    <!-- End Cart Box -->
                    <?php endif;?>
                    <?php if(!empty($header_btn['text'])):?>
                    <!-- Button Box -->
                    <div class="button-box">
                        <a href="<?php echo esc_url($header_btn['url']);?>" class="theme-btn btn-style-six clearfix">
                            <span class="btn-wrap">
                                <span class="text-one"><?php echo esc_html($header_btn['text']);?></span>
                                <span class="text-two"><?php echo esc_html($header_btn['text']);?></span>
                            </span>
                            <span class="icon flaticon-right-arrow"></span>
                        </a>
                    </div>
                    <?php endif;?>
                </div>
                <!-- End Outer Box -->
                
            </div>
            
        </div>
    </div>
    <!-- End Sticky Menu -->
      <?php prinox_mobile_menu();?>
    <!-- Mobile Menu  -->
    
    <!-- End Mobile Menu -->
<?php 
}

/**
 * Category Menu
 *
 * @return void
 */
function prinox_category_menu(){
    wp_nav_menu( array( 
        'theme_location' => 'category_menu', 
        'menu_id'        =>'prinoix-primary-menu',
        'menu_class'     =>'business-list',
        'container'=>false,
        'fallback_cb'    => 'Prinox_Bootstrap_Navwalker::fallback',
    ));	
}

function prinox_mobile_menu(){ ?>
    <div class="mobile-menu">
        <div class="menu-backdrop"></div>
        <div class="close-btn"><span class="icon flaticon-multiply"></span></div>
        <nav class="menu-box">
            <div class="nav-logo"><?php prinox_mobile_logo();?></div>
            <!-- Search -->
            <div class="search-box">
                <form method="post" action="<?php echo esc_url( home_url( '/' ) ); ?>">
                    <div class="form-group">
                        <input type="search" name="s" value="<?php the_search_query();?>" placeholder="<?php esc_attr_e( 'Search Here', 'prinox' );?>" required>
                        <button type="submit"><span class="icon flaticon-search-1"></span></button>
                    </div>
                </form>
            </div>
            <div class="menu-outer"><!--Here Menu Will Come Automatically Via Javascript / Same Menu as in Header--></div>
        </nav>
    </div>
<?php 
}

function prinox_currency_convert(){ 
    $currency_items = cs_get_option('currency_items');    
    $currency_active_name = cs_get_option('currency_active_name');    
    if(!empty($currency_items)):
?>
    <!-- Currency DropDown -->
    <div class="currency dropdown">
        <button class="btn dropdown-toggle" type="button" id="dropdownMenu" data-bs-toggle="dropdown" aria-expanded="false"><?php echo esc_html($currency_active_name);?> &nbsp;<span class="fa fa-angle-down"></span></button>
        <div class="dropdown-menu" aria-labelledby="dropdownMenu">
            <?php foreach($currency_items as $item):?>
                <li><a href="<?php echo esc_url($item['currency_link']);?>"><?php echo esc_attr($item['currency_name']);?></a></li>
            <?php endforeach;?>
        </div>
    </div>
    <?php 
    endif;
}

function prinox_languages(){
    $lang_active_name = cs_get_option('lang_active_name');    
    $languages_items = cs_get_option('languages_items');    
?>
    <!-- Language DropDown -->
    <div class="language dropdown">
        <button class="btn dropdown-toggle" type="button" id="dropdownMenu" data-bs-toggle="dropdown" aria-expanded="false"><?php echo esc_html($lang_active_name);?><span class="fa fa-angle-down"></span></button>
        <div class="dropdown-menu" aria-labelledby="dropdownMenu">
            <?php foreach($languages_items as $item):?>
                <li><a href="<?php echo esc_url($item['languages_link']);?>"><?php echo esc_attr($item['languages_name']);?></a></li>
            <?php endforeach;?>
        </div>
    </div>
    <?php 
}

function prinox_user_account(){ 
?>
    <?php
        if(class_exists('WooCommerce')) :
            $my_ac = get_option( 'woocommerce_myaccount_page_id' ); 
    ?>
    <!-- User Box -->
        <a class="user-box flaticon-user-3" href="<?php echo esc_url(get_permalink($my_ac)); ?>"></a>
    <?php endif; ?>
    <?php 
}

function prinox_social_box(){ 
    $social_icons = cs_get_option('prinox-social-global');
    ?>
    <ul class="social-box">
        <?php foreach($social_icons as $item):?>
            <li><a href="<?php echo esc_url($item['social_link']);?>" class="<?php echo esc_attr($item['social_icon']);?>"></a></li>
        <?php endforeach;?>
    </ul>
<?php 
}

function prinox_sidebar_option(){ 
$is_enable_sidebar_nav = cs_get_option('is_enable_sidebar_nav');
$contact_info_title = cs_get_option('contact_info_title');
$contact_info_items = cs_get_option('contact_info_items');
if(!empty($is_enable_sidebar_nav)):
?>
<div class="xs-sidebar-group info-group">
    <div class="xs-overlay xs-bg-black"></div>
    <div class="xs-sidebar-widget">
        <div class="sidebar-widget-container">
            <div class="widget-heading">
                <a href="#" class="close-side-widget">
                    <i class="icon flaticon-multiply"></i>
                </a>
            </div>
            <div class="sidebar-textwidget">
                
                <!-- Sidebar Info Content -->
                <div class="sidebar-info-contents">
                    <div class="content-inner">
                        <div class="logo">
                            <?php prinox_logo();?>
                        </div>
                        <div class="content-box">
                            <?php 
                                if(is_active_sidebar('sidebar-widget-3')){
                                    dynamic_sidebar( 'sidebar-widget-3' );
                                }
                            ?>
                            
                            <h6><?php echo wp_kses($contact_info_title, true)?></h6>
                            <?php if(!empty($contact_info_items)):?>
                            <!-- List Style One -->
                            <ul class="list-style-one">
                                <?php foreach($contact_info_items as $info):?>
                                <li>
                                    <span class="icon flaticon-maps-and-flags"></span>
                                    <strong><?php echo esc_html($info['title']); ?></strong>
                                    <?php echo wp_kses($info['infos'], true)?>
                                </li>
                                <?php endforeach;?>
                            </ul>
                            <?php endif;?>
                        </div>
                        
                    </div>
                </div>
                
            </div>
        </div>
    </div>
</div>
<?php 
endif;
}

/**
 * Prinox Footer function
 *
 * @return void
 */
function prinox_footer_options(){   

    if('footer-style-one' === prinox_site_footer()){
        get_template_part('template-parts/footer/footer', 'one');
    }elseif('footer-style-two' === prinox_site_footer()){
        get_template_part('template-parts/footer/footer', 'two');
    }elseif('footer-style-three' === prinox_site_footer()){
        get_template_part('template-parts/footer/footer', 'three');
    }elseif('footer-style-four' === prinox_site_footer()){
        get_template_part('template-parts/footer/footer', 'four');
    }elseif('footer-style-five' === prinox_site_footer()){
        get_template_part('template-parts/footer/footer', 'five');
    }elseif('footer-style-six' === prinox_site_footer()){
        get_template_part('template-parts/footer/footer', 'six');
    }else{
        get_template_part('template-parts/footer/footer', 'two');
    }
}

/**
 * Prinox Page Loop
 *
 * @return void
 */
function prinox_page_loop(){
    while ( have_posts() ) :
        the_post();

        get_template_part( 'template-parts/content', 'page' );

        // If comments are open or we have at least one comment, load up the comment template.
        if ( comments_open() || get_comments_number() ) :
            comments_template();
        endif;

    endwhile; // End of the loop.
}


function prinox_post_loop(){
    if ( have_posts() ) :

        if ( is_home() && ! is_front_page() ) :
        endif;

        /* Start the Loop */
        while ( have_posts() ) :
            the_post();

            /*
                * Include the Post-Type-specific template for the content.
                * If you want to override this in a child theme, then include a file
                * called content-___.php (where ___ is the Post Type name) and that will be used instead.
                */
            get_template_part( 'template-parts/content', get_post_format() );

        endwhile;

        prinox_pagination();

    else :

        get_template_part( 'template-parts/content', 'none' );

    endif;
}


/**
 * Prinox Single Post Loop
 */
function prinox_single_post_loop(){
    $single_post_navigation = cs_get_option('single_post_navigation');    
    while ( have_posts() ) :
        the_post();

        get_template_part( 'template-parts/content', 'single' );
        
        if($single_post_navigation == true){
            prinox_single_post_pagination();
        }       

        // If comments are open or we have at least one comment, load up the comment template.
        if ( comments_open() || get_comments_number() ) :
            comments_template();
        endif;

    endwhile; // End of the loop.
}


/**
 * Prinox Single Service Loop
 */
function prinox_single_service_loop(){
    while ( have_posts() ) :
        the_post();

        get_template_part( 'template-parts/service', 'content' );

    endwhile; // End of the loop.
}

/**
 * Prinox Single Service Loop
 */
function prinox_single_projects_loop(){
    while ( have_posts() ) :
        the_post();

        get_template_part( 'template-parts/project', 'content' );

    endwhile; // End of the loop.
}

/**
 * Prinox Page Breadcrumb
 *
 * @return void
 */
function prinox_page_breadcrumb(){ 
    $br_shape1 = cs_get_option('br_shape1');
    $br_shape2 = cs_get_option('br_shape2');

    if(get_post_meta(get_the_ID(), 'prinox_page_meta', true)) {
        $page_meta = get_post_meta(get_the_ID(), 'prinox_page_meta', true);
    } else {
        $page_meta = array();
    }

    if( array_key_exists( 'is_active_breadcrumb', $page_meta )) {
        $is_active_breadcrumb = $page_meta['is_active_breadcrumb'];
    } else {
        $is_active_breadcrumb = true;
    }

    if( array_key_exists( 'br_custom_title', $page_meta )) {
        $br_custom_title = $page_meta['br_custom_title'];
    } else {
        $br_custom_title = '';
    }

    if($is_active_breadcrumb == true):
?>
    <section class="page-title">
        <div class="auto-container">
			<!-- Icons Box -->
			<div class="icons-box parallax-scene-1">
				<div class="icon-one" data-depth="0.10"></div>
                <?php if(!empty($br_shape1['url'])):?>
				<div class="icon-two" data-depth="0.30">
					<img src="<?php echo esc_url($br_shape1['url']);?>" alt="<?php echo esc_attr($br_shape1['alt']);?>" />
				</div>
                <?php endif;?>
                <?php if(!empty($br_shape2['url'])):?>
				<div class="icon-three" data-depth="0.30">
                    <img src="<?php echo esc_url($br_shape2['url']);?>" alt="<?php echo esc_attr($br_shape2['alt']);?>" />
				</div>
                <?php endif;?>
				<div class="icon-four" data-depth="0.10"></div>
			</div>    
            <?php if(!empty($br_custom_title)):?>
                <h2><?php echo wp_kses( $br_custom_title, true ); ?></h2>
            <?php else:?>
                <h2><?php the_title(); ?></h2>
            <?php endif;?>  
            <?php echo prinox_the_breadcrumb();?>
        </div>
    </section>
<?php 
endif;
}

function prinox_blog_breadcrumb(){ 
    $br_shape1 = cs_get_option('br_shape1');
    $br_shape2 = cs_get_option('br_shape2');
    $br_custom_title = cs_get_option('br_custom_title');
?>
    <section class="page-title">
        <div class="auto-container">
			<!-- Icons Box -->
			<div class="icons-box parallax-scene-1">
				<div class="icon-one" data-depth="0.10"></div>
                <?php if(!empty($br_shape1['url'])):?>
				<div class="icon-two" data-depth="0.30">
					<img src="<?php echo esc_url($br_shape1['url']);?>" alt="<?php echo esc_attr($br_shape1['alt']);?>" />
				</div>
                <?php endif;?>
                <?php if(!empty($br_shape2['url'])):?>
				<div class="icon-three" data-depth="0.30">
                    <img src="<?php echo esc_url($br_shape2['url']);?>" alt="<?php echo esc_attr($br_shape2['alt']);?>" />
				</div>
                <?php endif;?>
				<div class="icon-four" data-depth="0.10"></div>
			</div>            
			<h2>
                <?php 
                    if(!empty($br_custom_title)){
                        echo esc_html($br_custom_title);
                    }else{
                        esc_html_e('Our Blog', 'prinox');
                    }
                ?>
            </h2>
            <?php echo prinox_the_breadcrumb();?>
        </div>
    </section>
<?php 
}

function prinox_shop_breadcrumb(){ 
    $br_shape1 = cs_get_option('br_shape1');
    $br_shape2 = cs_get_option('br_shape2');
    $shop_page_title = cs_get_option('shop_page_title');
?>
    <section class="page-title">
        <div class="auto-container">
			<!-- Icons Box -->
			<div class="icons-box parallax-scene-1">
				<div class="icon-one" data-depth="0.10"></div>
                <?php if(!empty($br_shape1['url'])):?>
				<div class="icon-two" data-depth="0.30">
					<img src="<?php echo esc_url($br_shape1['url']);?>" alt="<?php echo esc_attr($br_shape1['alt']);?>" />
				</div>
                <?php endif;?>
                <?php if(!empty($br_shape2['url'])):?>
				<div class="icon-three" data-depth="0.30">
                    <img src="<?php echo esc_url($br_shape2['url']);?>" alt="<?php echo esc_attr($br_shape2['alt']);?>" />
				</div>
                <?php endif;?>
				<div class="icon-four" data-depth="0.10"></div>
			</div>            
			<h2>
                <?php 
                    if(!empty($shop_page_title)){
                        echo esc_html($shop_page_title);
                    }else{
                        esc_html_e('Shop Page', 'prinox');
                    }
                ?>
            </h2>
            <?php echo prinox_the_breadcrumb();?>
        </div>
    </section>
<?php 
}

function prinox_blog_single_breadcrumb(){ 
    $br_shape1 = cs_get_option('br_shape1');
    $br_shape2 = cs_get_option('br_shape2');
    $br_single_custom_title = cs_get_option('br_single_custom_title');
?>
    <section class="page-title">
        <div class="auto-container">
			<!-- Icons Box -->
			<div class="icons-box parallax-scene-1">
				<div class="icon-one" data-depth="0.10"></div>
                <?php if(!empty($br_shape1['url'])):?>
				<div class="icon-two" data-depth="0.30">
					<img src="<?php echo esc_url($br_shape1['url']);?>" alt="<?php echo esc_attr($br_shape1['alt']);?>" />
				</div>
                <?php endif;?>
                <?php if(!empty($br_shape2['url'])):?>
				<div class="icon-three" data-depth="0.30">
                    <img src="<?php echo esc_url($br_shape2['url']);?>" alt="<?php echo esc_attr($br_shape2['alt']);?>" />
				</div>
                <?php endif;?>
				<div class="icon-four" data-depth="0.10"></div>
			</div>            
			<h2>
                <?php 
                    the_title();
                ?>
            </h2>
            <?php echo prinox_the_breadcrumb();?>
        </div>
    </section>
<?php 
}

/**
 * Undocumented function
 *
 * @return void
 */
function prinox_blog_archive_breadcrumb(){ 
    $br_shape1 = cs_get_option('br_shape1');
    $br_shape2 = cs_get_option('br_shape2');
    $br_custom_title = cs_get_option('br_custom_title');
?>
    <section class="page-title">
        <div class="auto-container">
			<!-- Icons Box -->
			<div class="icons-box parallax-scene-1">
				<div class="icon-one" data-depth="0.10"></div>
                <?php if(!empty($br_shape1['url'])):?>
				<div class="icon-two" data-depth="0.30">
					<img src="<?php echo esc_url($br_shape1['url']);?>" alt="<?php echo esc_attr($br_shape1['alt']);?>" />
				</div>
                <?php endif;?>
                <?php if(!empty($br_shape2['url'])):?>
				<div class="icon-three" data-depth="0.30">
                    <img src="<?php echo esc_url($br_shape2['url']);?>" alt="<?php echo esc_attr($br_shape2['alt']);?>" />
				</div>
                <?php endif;?>
				<div class="icon-four" data-depth="0.10"></div>
			</div>            
			<h2>                
                <?php
                    the_archive_title();
                    the_archive_description( '<div class="archive-description">', '</div>' );
                ?>
            </h2>
            <?php echo prinox_the_breadcrumb();?>
        </div>
    </section>
<?php 
}

/**
 * Undocumented function
 *
 * @return void
 */
function prinox_search_breadcrumb(){ 
    $br_shape1 = cs_get_option('br_shape1');
    $br_shape2 = cs_get_option('br_shape2');
    $br_custom_title = cs_get_option('br_custom_title');
?>
    <section class="page-title">
        <div class="auto-container">
			<!-- Icons Box -->
			<div class="icons-box parallax-scene-1">
				<div class="icon-one" data-depth="0.10"></div>
                <?php if(!empty($br_shape1['url'])):?>
				<div class="icon-two" data-depth="0.30">
					<img src="<?php echo esc_url($br_shape1['url']);?>" alt="<?php echo esc_attr($br_shape1['alt']);?>" />
				</div>
                <?php endif;?>
                <?php if(!empty($br_shape2['url'])):?>
				<div class="icon-three" data-depth="0.30">
                    <img src="<?php echo esc_url($br_shape2['url']);?>" alt="<?php echo esc_attr($br_shape2['alt']);?>" />
				</div>
                <?php endif;?>
				<div class="icon-four" data-depth="0.10"></div>
			</div>            
			<h2>                
                <?php
                    /* translators: %s: search query. */
                    printf( esc_html__( 'Search Results for: %s', 'prinox' ), '<span>' . get_search_query() . '</span>' );
				?>
            </h2>
            <?php echo prinox_the_breadcrumb();?>
        </div>
    </section>
<?php 
}

function prinox_error_page(){ 
    $error_title = cs_get_option('error_title');     
    $error_code = cs_get_option('error_code');     
    $error_info_title = cs_get_option('error_info_title');     
    $error_button = cs_get_option('error_button'); 
?>
    <!-- Error Section -->
    <div class="error-section">
    	<div class="auto-container">
        	<div class="content">
				<h1>
                    <?php 
                        if(!empty($error_code)){
                            echo esc_html( $error_code );
                        }else{
                            esc_html_e( '404', 'prinox' );
                        }
                    ?>
                </h1>
				<h2>
                    <?php 
                        if(!empty($error_title)){
                            echo esc_html( $error_title );
                        }else{
                            esc_html_e( 'Oops... It looks like you ‘re lost !', 'prinox' );
                        }
                    ?>  
                </h2>
				<div class="text">
                    <?php 
                        if(!empty($error_info_title)){
                            echo esc_html( $error_info_title );
                        }else{
                            esc_html_e( 'Oops! The page you are looking for does not exist. It might have been moved or deleted.', 'prinox' );
                        }
                    ?>     
                </div>
				<div class="button-box">
					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="theme-btn btn-style-three">
						<span class="btn-wrap">
							<span class="text-one">
                                <?php 
                                    if(!empty($error_button)){
                                        echo esc_html( $error_button );
                                    }else{
                                        esc_html_e( 'Go To Home', 'prinox' );
                                    }
                                ?>  
                            </span>
							<span class="text-two">
                                <?php 
                                    if(!empty($error_button)){
                                        echo esc_html( $error_button );
                                    }else{
                                        esc_html_e( 'Go To Home', 'prinox' );
                                    }
                                ?> 
                            </span>
						</span>
						<span class="icon flaticon-right-arrow"></span>
					</a>
				</div>
			</div>
		</div>
	</div>
	<!-- End Error Section -->
<?php 
}

/**
 * Prinox Archive Loop
 *
 * @return void
 */
function prinox_archive_loop(){ 
    if ( have_posts() ) :
        /* Start the Loop */
        while ( have_posts() ) :
            the_post();

            /*
                * Include the Post-Type-specific template for the content.
                * If you want to override this in a child theme, then include a file
                * called content-___.php (where ___ is the Post Type name) and that will be used instead.
                */
            get_template_part( 'template-parts/content', get_post_type() );

        endwhile;

        prinox_pagination();

    else :

        get_template_part( 'template-parts/content', 'none' );

    endif;
}

/**
 * Prinox Search Loop
 *
 * @return void
 */
function prinox_search_loop(){
    if ( have_posts() ) :

		/* Start the Loop */
		while ( have_posts() ) :
			the_post();

			/**
			 * Run the loop for the search to output the results.
			 * If you want to overload this in a child theme then include a file
			 * called content-search.php and that will be used instead.
			 */
			get_template_part( 'template-parts/content', 'search' );

		endwhile;

		prinox_pagination();

	else :

		get_template_part( 'template-parts/content', 'none' );

	endif;
}