Your account expired support, please renew to get your support.

Home Forums Themes Support Claue My account menu in header

Viewing 2 reply threads
  • Author
    Posts
    • #39195
      effiekyr
      Support Expired

      Hello, I tried to modify the init.php file by adding it in the child theme folder, as we need to  add the wording “My account” next to the user icon but it doesn’t override the parent theme init.php file. Could you please help?

      Attachments:
      You must be logged in to view attached files.
    • #39197
      Harry
      Support Expired

      Hi Effiekyr,

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

      if ( ! function_exists( 'jas_claue_wc_my_account' ) ) {
      	function jas_claue_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> My account</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__( 'Dashboard', 'claue' ) . '</a></li>';
      						$output .= '<li><a class="db cg chp" href="' . esc_url( home_url( '/orders-tracking/' ) ) . '">' . esc_html__( 'Order Tracking', 'claue' ) . '</a></li>';
      						$output .= '<li><a class="db cg chp" href="' . esc_url( wp_logout_url() ) . '">' . esc_html__( 'Logout', 'claue' ) . '</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', 'claue' ) . '</a></li>';
      					}
      				$output .= '</ul>';
      			$output .= '</div>';
      		}
      
      		return apply_filters( 'jas_claue_wc_my_account', $output );
      	}
      }

      Kind regards

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

    • #39208
      effiekyr
      Support Expired

      Thank you so much! It worked.

Viewing 2 reply threads

You must be logged in to reply to this topic.