Home Forums Themes Support Gecko Edit Login Logout at header

Topic Resolution: Resolved
Viewing 6 reply threads
  • Author
    Posts
    • #29293

      Hi i use layout-3.php

      I would like to replace the default login register system with one popup. I found a plugin which use a shortcode.

      I go to layout-3.php and make the edits

      The code is now

      <?php
      if ( class_exists( ‘WooCommerce’ ) ) {
      echo do_shortcode(“[xoo_el_action]”);

      if ( class_exists( ‘YITH_WCWL’ ) ) {
      global $yith_wcwl;
      echo ‘get_wishlist_url() ) . ‘”><i class=”pe-7s-like”></i>‘;
      }
      echo jas_gecko_wc_shopping_cart();
      }
      ?>

      It seems to work but instead the icon you had before it shows only the text login or logout (if you are loged in)

      How could i use this shortcode and keep the icon (of a person) you have at demo?

      Thanks

      Attachments:
      You must be logged in to view attached files.
    • #29296

      Hi,

      Please add below code to claue-child > functions.php

      if ( ! function_exists( 'jas_gecko_wc_my_account' ) ) {
      	function jas_gecko_wc_my_account() {
      		$output = '';
      
      		if ( cs_get_option( 'header-my-account-icon' ) ) {
      			$output .= '<div class="jas-my-account hidden-xs ts__05 pr">';
      				$output .= '<a class="cb chp db" href="' . esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) . '"><i class="pe-7s-user"></i></a>';
      				$output .= '<ul class="pa tc">';
      					if ( is_user_logged_in() ) {
      						$output .= '<li><a class="db cg chp" href="' . esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) . '">' . esc_html__( 'My Account', 'gecko' ) . '</a></li>';
      						$output .= '<li><a class="db cg chp" href="' . esc_url( wp_logout_url() ) . '">' . esc_html__( 'Logout', 'gecko' ) . '</a></li>';
      					} else {
      						$output .= '<li><a class="db cg chp" href="' . esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) . '">' . esc_html__( 'Login / Register', 'gecko' ) . '</a></li>';
      					}
      				$output .= '</ul>';
      			$output .= '</div>';
      		}
      
      		return apply_filters( 'jas_gecko_wc_my_account', $output );
      	}
      }

      And change code to popup to

      <li><a class="db cg chp" href="' . esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) . '">' . esc_html__( 'Login / Register', 'gecko' ) . '</a></li>

      Kind regards

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

    • #29311

      Good morning Harry. Thanks for your time.

      I did the changes but i get again the login register text instead of the icon. Also now it doesn’t work the popup plugin. It redirects me to the login page of woo. The plugin i use for popup use the shortcode [xoo_el_action] to call the popup form.

      Attachments:
      You must be logged in to view attached files.
    • #29315

      Hi,

      Could you send me your site url and attach copy version of plugin at this topic so we can check.

      Thanks

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

    • #29318

      Sure

      https://www.santarosa.gr

      Attachments:
      You must be logged in to view attached files.
    • #29320

      Hi,

      Please add below code to JanStudio > Theme Option > General Layout > Custom CSS

      .xoo-el-action-sc {
      	position: relative;
      	text-indent: 999em;
      	width: 32px;
      	height: 30px;
      }
      .xoo-el-action-sc:after {
      	position: absolute;
      	content: '\e6ac';
      	font-family: 'Pe-icon-7-stroke';
      	top: -9px;
      	left: 0;
      	font-size: 28px;
      	text-indent: 0;
      }
      .xoo-el-login-tgr.xoo-el-action-sc:after {
      	content: '\e605';
      }

      Kind regards

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

    • #29641

      It worked ok. Thanks for all

Viewing 6 reply threads

You must be logged in to reply to this topic.