Home Forums Themes Support Claue Search Bugs in RTL

Viewing 16 reply threads
  • Author
    Posts
    • #19593

      Hi Harry,

      The search in RTL has some bugs:
      1) The title and the description of the product need some space like demo
      2) I can only find products in the search preview when I just write in English, but as you know my site is in Persian and user will search in Persian. The preview doesn’t show the products in Persian but when I write and then press Enter, I see the results in Persian.

      3)I realized that in the search the description will be searched too. I mean for example if my product’s title doesn’t have the word ” Adidas ” but I have it in the description, it will be show up!
      Is it normal?! Is there any chance to limit the search only on the title?
      And I see that the short description is shown too. How can I only show the title?

      Watch This Please

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #19890

      Hi Harry,

      Hope you are fine.

      Is there any solution for this?

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #19926

      Hi Rahim,

      1. Please add below code to Claue > Theme Option > General Layout > Custom CSS

      .ui-autocomplete li .pl__15 {
      	padding-right: 15px;
      	padding-left: 0;
      }

      2. I still finding solution for search function with Persian.

      3. It function of WooCommerce, this also search in product description. Can’t only product title.

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #19927

      Hi Harry,

      3) According to this link, we are able to limit the searches only from title :

      /**
       * Search SQL filter for matching against post title only.
       *
       * @link    http://wordpress.stackexchange.com/a/11826/1685
       *
       * @param   string      $search
       * @param   WP_Query    $wp_query
       */
      function wpse_11826_search_by_title( $search, $wp_query ) {
          if ( ! empty( $search ) && ! empty( $wp_query->query_vars['search_terms'] ) ) {
              global $wpdb;
      
              $q = $wp_query->query_vars;
              $n = ! empty( $q['exact'] ) ? '' : '%';
      
              $search = array();
      
              foreach ( ( array ) $q['search_terms'] as $term )
                  $search[] = $wpdb->prepare( "$wpdb->posts.post_title LIKE %s", $n . $wpdb->esc_like( $term ) . $n );
      
              if ( ! is_user_logged_in() )
                  $search[] = "$wpdb->posts.post_password = ''";
      
              $search = ' AND ' . implode( ' AND ', $search );
          }
      
          return $search;
      }
      
      add_filter( 'posts_search', 'wpse_11826_search_by_title', 10, 2 );

      Just wanted to share it with you πŸ™‚

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #19928

      I have added that to my functions.php of my child theme but made it as a comment.
      till find a solution for searching on other languages. πŸ™‚

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #19949

      Hi Rahim,

      Thank you for share, hope we find solution for search in Persian language soon.

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #19950

      I hope so Harry,

      I will make a ticket on Woocommerce Support for this.
      And if they answered will share the reply with you. πŸ™‚

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #23001

      Hi dear Harry,

      Any update or solution for this?

      Thank you. πŸ™‚

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #23019

      Hi Rahim,

      We still don’t have solution for this πŸ™

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #25873

      Hi Harry,

      Hope you are doing very well.

      According to this topic I recommend you to analyze theΒ Ajax Search for WooCommerce

      I installed and just added it to my widget area to just test it. Check this :

      https://monosnap.com/file/JfgT0CBvH6cOnfmmlfoYfYdjOyfBS5

      And I found out that this plugin finds the results when I search in Persian,

      As you remember, the theme only finds the search in English.

      I hope you find a solution for this.

      Many customers are not English.

      Regards.

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #25878

      Hi Rahim,

      Please go to claue-child > views > header > layout-4.php and remove class “jas-ajax-search” to remove default search and use search of plugin.

      Regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #25879

      Hi Harry,

      Is this all?

      I mean that, do I need to add any shortcode or any other thing in here?

      This is the shortcode of the plugin : [wcas-search-form]

      Regards.

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #25881

      Hi Rahim,

      Pleasse place code

      <form class="header__search w__100 dn pf" role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" <?php jas_claue_schema_metadata( array( 'context' => 'search_form' ) ); ?>>
      		<div class="pa">
      			<input class="w__100 jas-ajax-search" type="text" name="s" placeholder="<?php echo esc_html__( 'Search for...', 'claue' ); ?>" />
      			<input type="hidden" name="post_type" value="product">
      		</div>
      		<a id="sf-close" class="pa" href="#"><i class="pe-7s-close"></i></a>
      	</form><!-- #header__search -->

      with new

      <div class="header__search w__100 dn pf">
      <?php echo do_shortcode( '[wcas-search-form]' ); ?>
      </div>

      Regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #26137

      Hi Harry,

      This is the source of my layout-4.php in the child theme:

      <?php
      /**
      * The header layout 4.
      *
      * @since 1.0.0
      * @package Claue
      */
      ?>
      <header id="jas-header" class="header-4" <?php jas_claue_schema_metadata( array( 'context' => 'header' ) ); ?>>
      <?php if ( cs_get_option( 'header-top-left' ) || cs_get_option( 'header-top-center' ) || cs_get_option( 'header-currency' ) ) : ?>
      <div class="header__top bgbl pt__10 pb__10 pl__15 pr__15 fs__12">
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '<div class="jas-container">'; endif; ?>
      <div class="jas-row middle-xs">
      <div class="jas-col-md-4 jas-col-sm-6 jas-col-xs-12 start-md start-sm center-xs">
      <?php if ( cs_get_option( 'header-top-left' ) ) : ?>
      <div class="header-text"><?php echo do_shortcode( cs_get_option( 'header-top-left' ) ); ?></div>
      <?php endif; ?>
      </div>
      <div class="jas-col-md-4 jas-col-sm-6 jas-col-xs-12 center-md end-sm center-xs">
      <?php if ( cs_get_option( 'header-top-center' ) ) : ?>
      <div class="header-text"><?php echo do_shortcode( cs_get_option( 'header-top-center' ) ); ?></div>
      <?php endif; ?>
      </div>
      <div class="jas-col-md-4 jas-col-sm-3 jas-col-xs-12 flex end-lg end-md hidden-sm hidden-xs">
      <?php if ( cs_get_option( 'header-top-right' ) ) : ?>
      <div class="header-text mr__15"><?php echo do_shortcode( cs_get_option( 'header-top-right' ) ); ?></div>
      <?php endif; ?>
      <?php
      if ( class_exists( 'WooCommerce' ) && cs_get_option( 'header-currency' ) ) {
      echo jas_claue_wc_currency();
      }
      ?>
      </div>
      </div><!-- .jas-row -->
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '</div>'; endif; ?>
      </div><!-- .header__top -->
      <?php endif; ?>
      <div class="header__mid pl__15 pr__15<?php echo ( cs_get_option( 'header-transparent' ) ? ' header__transparent pa w__100' : '' ); ?>">
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '<div class="jas-container">'; endif; ?>
      <div class="jas-row middle-xs pt__10 pb__10">
      
      <div class="jas-col-md-2 jas-col-sm-3 jas-col-xs-3 flex start-md flex">
      <div class="jas-action flex end-xs middle-xs">
      <?php if ( cs_get_option( 'header-search-icon' ) ) : ?>
      <a class="sf-open cb chp hidden-xs" href="javascript:void(0);"><i class="pe-7s-search"></i></a>
      <?php endif; ?>
      
      <?php
      if ( class_exists( 'WooCommerce' ) ) {
      echo jas_claue_wc_my_account();
      
      if ( class_exists( 'YITH_WCWL' ) ) {
      global $yith_wcwl;
      echo '<a class="cb chp hidden-xs" href="' . esc_url( $yith_wcwl->get_wishlist_url() ) . '"><i class="pe-7s-like"></i></a>';
      }
      echo jas_claue_wc_shopping_cart();
      }
      ?>
      </div><!-- .jas-action -->
      </div>
      
      <div class="jas-col-md-8 jas-col-sm-6 jas-col-xs-6 center-xs">
      <?php jas_claue_logo(); ?>
      </div>
      
      <div class="jas-col-md-2 jas-col-sm-3 jas-col-xs-3">
      <a href="javascript:void(0);" class="jas-push-menu-btn hide-md visible-sm visible-xs">
      <?php
      if ( cs_get_option( 'mobile-icon' ) ) :
      $icon = wp_get_attachment_image_src( cs_get_option( 'mobile-icon' ), 'full', true );
      echo '<img src="' . esc_url( $icon[0] ) . '" width="30" height="30" alt="Menu" />';
      else :
      echo '<img src="/wp-content/themes/claue-child/assets/images/icons/hamburger-black.svg" width="30" height="16" alt="Menu" />';
      endif;
      ?>
      </a>
      <div class="hidden-xs hidden-sm">
      <?php echo jas_claue_social(); ?>
      </div>
      </div>
      </div><!-- .jas-row -->
      <div class="header__bot hidden-sm">
      <nav class="jas-navigation flex center-xs">
      <?php
      if ( has_nav_menu( 'primary-menu' ) ) {
      wp_nav_menu(
      array(
      'theme_location' => 'primary-menu',
      'menu_class' => 'jas-menu clearfix',
      'menu_id' => 'jas-menu',
      'container' => false,
      'walker' => new JAS_Claue_Menu_Walker(),
      'fallback_cb' => NULL
      )
      );
      } else {
      echo '<ul class="jas-menu clearfix"><li><a target="_blank" href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '">' . esc_html__( 'Add Menu', 'claue' ) . '</a></li></ul>';
      }
      ?>
      </nav><!-- .jas-navigation -->
      </div><!-- .header__bot -->
      
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '</div>'; endif; ?>
      </div><!-- .header__mid -->
      
      <form class="header__search w__100 dn pf" role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" <?php jas_claue_schema_metadata( array( 'context' => 'search_form' ) ); ?>>
      <div class="pa">
      <input class="w__100 jas-ajax-search" type="text" name="s" placeholder="<?php echo esc_html__( 'Search for...', 'claue' ); ?>" />
      <input type="hidden" name="post_type" value="product">
      </div>
      <a id="sf-close" class="pa" href="#"><i class="pe-7s-close"></i></a>
      </form><!-- #header__search -->
      
      <div class="jas-canvas-menu jas-push-menu">
      <h3 class="mg__0 tc cw bgb tu ls__2"><?php esc_html_e( 'Menu', 'claue' ); ?> <i class="close-menu pe-7s-close pa"></i></h3>
      <div class="hide-md visible-sm visible-xs mt__30 center-xs flex tc">
      <?php if ( cs_get_option( 'header-top-right' ) ) : ?>
      <div class="header-text mr__15"><?php echo do_shortcode( cs_get_option( 'header-top-right' ) ); ?></div>
      <?php endif; ?>
      <?php
      if ( class_exists( 'WooCommerce' ) && cs_get_option( 'header-currency' ) ) {
      echo jas_claue_wc_currency();
      }
      ?>
      </div>
      <div class="jas-action flex center-xs middle-xs hide-md hidden-sm visible-xs mt__10">
      <a class="sf-open cb chp" href="javascript:void(0);"><i class="pe-7s-search"></i></a>
      <?php
      if ( class_exists( 'WooCommerce' ) ) {
      echo '<a class="cb chp db jas-my-account" href="' . esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) . '"><i class="pe-7s-user"></i></a>';
      
      if ( class_exists( 'YITH_WCWL' ) ) {
      global $yith_wcwl;
      echo '<a class="cb chp wishlist-icon" href="' . esc_url( $yith_wcwl->get_wishlist_url() ) . '"><i class="pe-7s-like"></i></a>';
      }
      }
      ?>
      </div><!-- .jas-action -->
      <?php
      wp_nav_menu(
      array(
      'theme_location' => 'primary-menu',
      'container_id' => 'jas-mobile-menu',
      'walker' => new JAS_Claue_Mobile_Menu_Walker(),
      'fallback_cb' => NULL
      )
      );
      ?>
      <div class="hidden-md visible-sm visible-xs tc mt__20 mb__30">
      <?php echo jas_claue_social(); ?>
      </div>
      </div><!-- .jas-canvas-menu -->
      
      <?php if ( class_exists( 'WooCommerce' ) ) : ?>
      <div class="jas-mini-cart jas-push-menu">
      <div class="jas-mini-cart-content">
      <h3 class="mg__0 tc cw bgb tu ls__2"><?php esc_html_e( 'Mini Cart', 'claue' );?> <i class="close-cart pe-7s-close pa"></i></h3>
      <div class="widget_shopping_cart_content"></div>
      </div>
      </div><!-- .jas-mini-cart -->
      <?php endif ?>
      </header><!-- #jas-header -->

       

      Can you please make the changes and give me the file?

      I don’t know where should I add the divΒ you gave me.

      Regards.

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #26147

      Hi Rahim,

      Please use below code

      <?php
      /**
      * The header layout 4.
      *
      * @since 1.0.0
      * @package Claue
      */
      ?>
      <header id="jas-header" class="header-4" <?php jas_claue_schema_metadata( array( 'context' => 'header' ) ); ?>>
      <?php if ( cs_get_option( 'header-top-left' ) || cs_get_option( 'header-top-center' ) || cs_get_option( 'header-currency' ) ) : ?>
      <div class="header__top bgbl pt__10 pb__10 pl__15 pr__15 fs__12">
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '<div class="jas-container">'; endif; ?>
      <div class="jas-row middle-xs">
      <div class="jas-col-md-4 jas-col-sm-6 jas-col-xs-12 start-md start-sm center-xs">
      <?php if ( cs_get_option( 'header-top-left' ) ) : ?>
      <div class="header-text"><?php echo do_shortcode( cs_get_option( 'header-top-left' ) ); ?></div>
      <?php endif; ?>
      </div>
      <div class="jas-col-md-4 jas-col-sm-6 jas-col-xs-12 center-md end-sm center-xs">
      <?php if ( cs_get_option( 'header-top-center' ) ) : ?>
      <div class="header-text"><?php echo do_shortcode( cs_get_option( 'header-top-center' ) ); ?></div>
      <?php endif; ?>
      </div>
      <div class="jas-col-md-4 jas-col-sm-3 jas-col-xs-12 flex end-lg end-md hidden-sm hidden-xs">
      <?php if ( cs_get_option( 'header-top-right' ) ) : ?>
      <div class="header-text mr__15"><?php echo do_shortcode( cs_get_option( 'header-top-right' ) ); ?></div>
      <?php endif; ?>
      <?php
      if ( class_exists( 'WooCommerce' ) && cs_get_option( 'header-currency' ) ) {
      echo jas_claue_wc_currency();
      }
      ?>
      </div>
      </div><!-- .jas-row -->
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '</div>'; endif; ?>
      </div><!-- .header__top -->
      <?php endif; ?>
      <div class="header__mid pl__15 pr__15<?php echo ( cs_get_option( 'header-transparent' ) ? ' header__transparent pa w__100' : '' ); ?>">
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '<div class="jas-container">'; endif; ?>
      <div class="jas-row middle-xs pt__10 pb__10">
      
      <div class="jas-col-md-2 jas-col-sm-3 jas-col-xs-3 flex start-md flex">
      <div class="jas-action flex end-xs middle-xs">
      <?php if ( cs_get_option( 'header-search-icon' ) ) : ?>
      <a class="sf-open cb chp hidden-xs" href="javascript:void(0);"><i class="pe-7s-search"></i></a>
      <?php endif; ?>
      
      <?php
      if ( class_exists( 'WooCommerce' ) ) {
      echo jas_claue_wc_my_account();
      
      if ( class_exists( 'YITH_WCWL' ) ) {
      global $yith_wcwl;
      echo '<a class="cb chp hidden-xs" href="' . esc_url( $yith_wcwl->get_wishlist_url() ) . '"><i class="pe-7s-like"></i></a>';
      }
      echo jas_claue_wc_shopping_cart();
      }
      ?>
      </div><!-- .jas-action -->
      </div>
      
      <div class="jas-col-md-8 jas-col-sm-6 jas-col-xs-6 center-xs">
      <?php jas_claue_logo(); ?>
      </div>
      
      <div class="jas-col-md-2 jas-col-sm-3 jas-col-xs-3">
      <a href="javascript:void(0);" class="jas-push-menu-btn hide-md visible-sm visible-xs">
      <?php
      if ( cs_get_option( 'mobile-icon' ) ) :
      $icon = wp_get_attachment_image_src( cs_get_option( 'mobile-icon' ), 'full', true );
      echo '<img src="' . esc_url( $icon[0] ) . '" width="30" height="30" alt="Menu" />';
      else :
      echo '<img src="/wp-content/themes/claue-child/assets/images/icons/hamburger-black.svg" width="30" height="16" alt="Menu" />';
      endif;
      ?>
      </a>
      <div class="hidden-xs hidden-sm">
      <?php echo jas_claue_social(); ?>
      </div>
      </div>
      </div><!-- .jas-row -->
      <div class="header__bot hidden-sm">
      <nav class="jas-navigation flex center-xs">
      <?php
      if ( has_nav_menu( 'primary-menu' ) ) {
      wp_nav_menu(
      array(
      'theme_location' => 'primary-menu',
      'menu_class' => 'jas-menu clearfix',
      'menu_id' => 'jas-menu',
      'container' => false,
      'walker' => new JAS_Claue_Menu_Walker(),
      'fallback_cb' => NULL
      )
      );
      } else {
      echo '<ul class="jas-menu clearfix"><li><a target="_blank" href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '">' . esc_html__( 'Add Menu', 'claue' ) . '</a></li></ul>';
      }
      ?>
      </nav><!-- .jas-navigation -->
      </div><!-- .header__bot -->
      
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '</div>'; endif; ?>
      </div><!-- .header__mid -->
      
      <div class="header__search w__100 dn pf">
      <?php echo do_shortcode( '[wcas-search-form]' ); ?>
      </div>
      
      <div class="jas-canvas-menu jas-push-menu">
      <h3 class="mg__0 tc cw bgb tu ls__2"><?php esc_html_e( 'Menu', 'claue' ); ?> <i class="close-menu pe-7s-close pa"></i></h3>
      <div class="hide-md visible-sm visible-xs mt__30 center-xs flex tc">
      <?php if ( cs_get_option( 'header-top-right' ) ) : ?>
      <div class="header-text mr__15"><?php echo do_shortcode( cs_get_option( 'header-top-right' ) ); ?></div>
      <?php endif; ?>
      <?php
      if ( class_exists( 'WooCommerce' ) && cs_get_option( 'header-currency' ) ) {
      echo jas_claue_wc_currency();
      }
      ?>
      </div>
      <div class="jas-action flex center-xs middle-xs hide-md hidden-sm visible-xs mt__10">
      <a class="sf-open cb chp" href="javascript:void(0);"><i class="pe-7s-search"></i></a>
      <?php
      if ( class_exists( 'WooCommerce' ) ) {
      echo '<a class="cb chp db jas-my-account" href="' . esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) . '"><i class="pe-7s-user"></i></a>';
      
      if ( class_exists( 'YITH_WCWL' ) ) {
      global $yith_wcwl;
      echo '<a class="cb chp wishlist-icon" href="' . esc_url( $yith_wcwl->get_wishlist_url() ) . '"><i class="pe-7s-like"></i></a>';
      }
      }
      ?>
      </div><!-- .jas-action -->
      <?php
      wp_nav_menu(
      array(
      'theme_location' => 'primary-menu',
      'container_id' => 'jas-mobile-menu',
      'walker' => new JAS_Claue_Mobile_Menu_Walker(),
      'fallback_cb' => NULL
      )
      );
      ?>
      <div class="hidden-md visible-sm visible-xs tc mt__20 mb__30">
      <?php echo jas_claue_social(); ?>
      </div>
      </div><!-- .jas-canvas-menu -->
      
      <?php if ( class_exists( 'WooCommerce' ) ) : ?>
      <div class="jas-mini-cart jas-push-menu">
      <div class="jas-mini-cart-content">
      <h3 class="mg__0 tc cw bgb tu ls__2"><?php esc_html_e( 'Mini Cart', 'claue' );?> <i class="close-cart pe-7s-close pa"></i></h3>
      <div class="widget_shopping_cart_content"></div>
      </div>
      </div><!-- .jas-mini-cart -->
      <?php endif ?>
      </header><!-- #jas-header -->

      Regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #26151

      Hi Harry,

      Thank you for the help.

      If you check that on my site:

      1.How can I center align the search field like the theme’s default

      2.The x button needs some css fix

      3.I cannot close the search and go back to the site, there is no X

      Regards.

      Rahim Vaziri
      CEO & Founder at Look.ir

    • #26177

      Hi Rahim,

      Please use below code

      <?php
      /**
      * The header layout 4.
      *
      * @since 1.0.0
      * @package Claue
      */
      ?>
      <header id="jas-header" class="header-4" <?php jas_claue_schema_metadata( array( 'context' => 'header' ) ); ?>>
      <?php if ( cs_get_option( 'header-top-left' ) || cs_get_option( 'header-top-center' ) || cs_get_option( 'header-currency' ) ) : ?>
      <div class="header__top bgbl pt__10 pb__10 pl__15 pr__15 fs__12">
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '<div class="jas-container">'; endif; ?>
      <div class="jas-row middle-xs">
      <div class="jas-col-md-4 jas-col-sm-6 jas-col-xs-12 start-md start-sm center-xs">
      <?php if ( cs_get_option( 'header-top-left' ) ) : ?>
      <div class="header-text"><?php echo do_shortcode( cs_get_option( 'header-top-left' ) ); ?></div>
      <?php endif; ?>
      </div>
      <div class="jas-col-md-4 jas-col-sm-6 jas-col-xs-12 center-md end-sm center-xs">
      <?php if ( cs_get_option( 'header-top-center' ) ) : ?>
      <div class="header-text"><?php echo do_shortcode( cs_get_option( 'header-top-center' ) ); ?></div>
      <?php endif; ?>
      </div>
      <div class="jas-col-md-4 jas-col-sm-3 jas-col-xs-12 flex end-lg end-md hidden-sm hidden-xs">
      <?php if ( cs_get_option( 'header-top-right' ) ) : ?>
      <div class="header-text mr__15"><?php echo do_shortcode( cs_get_option( 'header-top-right' ) ); ?></div>
      <?php endif; ?>
      <?php
      if ( class_exists( 'WooCommerce' ) && cs_get_option( 'header-currency' ) ) {
      echo jas_claue_wc_currency();
      }
      ?>
      </div>
      </div><!-- .jas-row -->
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '</div>'; endif; ?>
      </div><!-- .header__top -->
      <?php endif; ?>
      <div class="header__mid pl__15 pr__15<?php echo ( cs_get_option( 'header-transparent' ) ? ' header__transparent pa w__100' : '' ); ?>">
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '<div class="jas-container">'; endif; ?>
      <div class="jas-row middle-xs pt__10 pb__10">
      
      <div class="jas-col-md-2 jas-col-sm-3 jas-col-xs-3 flex start-md flex">
      <div class="jas-action flex end-xs middle-xs">
      <?php if ( cs_get_option( 'header-search-icon' ) ) : ?>
      <a class="sf-open cb chp hidden-xs" href="javascript:void(0);"><i class="pe-7s-search"></i></a>
      <?php endif; ?>
      
      <?php
      if ( class_exists( 'WooCommerce' ) ) {
      echo jas_claue_wc_my_account();
      
      if ( class_exists( 'YITH_WCWL' ) ) {
      global $yith_wcwl;
      echo '<a class="cb chp hidden-xs" href="' . esc_url( $yith_wcwl->get_wishlist_url() ) . '"><i class="pe-7s-like"></i></a>';
      }
      echo jas_claue_wc_shopping_cart();
      }
      ?>
      </div><!-- .jas-action -->
      </div>
      
      <div class="jas-col-md-8 jas-col-sm-6 jas-col-xs-6 center-xs">
      <?php jas_claue_logo(); ?>
      </div>
      
      <div class="jas-col-md-2 jas-col-sm-3 jas-col-xs-3">
      <a href="javascript:void(0);" class="jas-push-menu-btn hide-md visible-sm visible-xs">
      <?php
      if ( cs_get_option( 'mobile-icon' ) ) :
      $icon = wp_get_attachment_image_src( cs_get_option( 'mobile-icon' ), 'full', true );
      echo '<img src="' . esc_url( $icon[0] ) . '" width="30" height="30" alt="Menu" />';
      else :
      echo '<img src="/wp-content/themes/claue-child/assets/images/icons/hamburger-black.svg" width="30" height="16" alt="Menu" />';
      endif;
      ?>
      </a>
      <div class="hidden-xs hidden-sm">
      <?php echo jas_claue_social(); ?>
      </div>
      </div>
      </div><!-- .jas-row -->
      <div class="header__bot hidden-sm">
      <nav class="jas-navigation flex center-xs">
      <?php
      if ( has_nav_menu( 'primary-menu' ) ) {
      wp_nav_menu(
      array(
      'theme_location' => 'primary-menu',
      'menu_class' => 'jas-menu clearfix',
      'menu_id' => 'jas-menu',
      'container' => false,
      'walker' => new JAS_Claue_Menu_Walker(),
      'fallback_cb' => NULL
      )
      );
      } else {
      echo '<ul class="jas-menu clearfix"><li><a target="_blank" href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '">' . esc_html__( 'Add Menu', 'claue' ) . '</a></li></ul>';
      }
      ?>
      </nav><!-- .jas-navigation -->
      </div><!-- .header__bot -->
      
      <?php if ( cs_get_option( 'header-boxed' ) ) : echo '</div>'; endif; ?>
      </div><!-- .header__mid -->
      
      <div class="header__search w__100 dn pf">
      <div class="pa tc"><?php echo do_shortcode( '[wcas-search-form]' ); ?></div>
      <a id="sf-close" class="pa" href="#"><i class="pe-7s-close"></i></a>
      </div>
      
      <div class="jas-canvas-menu jas-push-menu">
      <h3 class="mg__0 tc cw bgb tu ls__2"><?php esc_html_e( 'Menu', 'claue' ); ?> <i class="close-menu pe-7s-close pa"></i></h3>
      <div class="hide-md visible-sm visible-xs mt__30 center-xs flex tc">
      <?php if ( cs_get_option( 'header-top-right' ) ) : ?>
      <div class="header-text mr__15"><?php echo do_shortcode( cs_get_option( 'header-top-right' ) ); ?></div>
      <?php endif; ?>
      <?php
      if ( class_exists( 'WooCommerce' ) && cs_get_option( 'header-currency' ) ) {
      echo jas_claue_wc_currency();
      }
      ?>
      </div>
      <div class="jas-action flex center-xs middle-xs hide-md hidden-sm visible-xs mt__10">
      <a class="sf-open cb chp" href="javascript:void(0);"><i class="pe-7s-search"></i></a>
      <?php
      if ( class_exists( 'WooCommerce' ) ) {
      echo '<a class="cb chp db jas-my-account" href="' . esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) . '"><i class="pe-7s-user"></i></a>';
      
      if ( class_exists( 'YITH_WCWL' ) ) {
      global $yith_wcwl;
      echo '<a class="cb chp wishlist-icon" href="' . esc_url( $yith_wcwl->get_wishlist_url() ) . '"><i class="pe-7s-like"></i></a>';
      }
      }
      ?>
      </div><!-- .jas-action -->
      <?php
      wp_nav_menu(
      array(
      'theme_location' => 'primary-menu',
      'container_id' => 'jas-mobile-menu',
      'walker' => new JAS_Claue_Mobile_Menu_Walker(),
      'fallback_cb' => NULL
      )
      );
      ?>
      <div class="hidden-md visible-sm visible-xs tc mt__20 mb__30">
      <?php echo jas_claue_social(); ?>
      </div>
      </div><!-- .jas-canvas-menu -->
      
      <?php if ( class_exists( 'WooCommerce' ) ) : ?>
      <div class="jas-mini-cart jas-push-menu">
      <div class="jas-mini-cart-content">
      <h3 class="mg__0 tc cw bgb tu ls__2"><?php esc_html_e( 'Mini Cart', 'claue' );?> <i class="close-cart pe-7s-close pa"></i></h3>
      <div class="widget_shopping_cart_content"></div>
      </div>
      </div><!-- .jas-mini-cart -->
      <?php endif ?>
      </header><!-- #jas-header -->

      Regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

Viewing 16 reply threads

You must be logged in to reply to this topic.