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

Home Forums Themes Support Claue Customization My Account Menu Dropdown Items

Topic Resolution: Resolved
Viewing 7 reply threads
  • Author
    Posts
    • #39377
      seventalents
      Support Expired

      How can I edit My Account Menu Dropdown Items?

      In particular, how can I replace Order Tracking with My Orders (see attached screenshot)?

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

      Hi,

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

      f ( ! 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></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( '/mio-account/orders/' ) ) . '">' . esc_html__( 'My Orders', '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

      • This reply was modified 3 years, 5 months ago by Harry.

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

    • #39476
      seventalents
      Support Expired

      Thanks! It works!

      I have a multilingual website and I use WPML …

      how can I change home_url( ‘/mio-account/orders/’ ) and replace with home_url( ‘/en/my-account/orders/’ )?

      Besides how can I translate in English menu item “I miei Ordini”?

       

      Let me know, please.

    • #39481
      Harry
      Support Expired

      Hi,

      Please change code to

      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></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( wc_get_endpoint_url( 'orders' ) ) . '">' . esc_html__( 'My Orders', '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 );
      	}
      }

      That you can translate for multilingual site.

      Kind regards

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

    • #39552
      seventalents
      Support Expired

      ok, but how can I replace home_url( ‘/mio-account/orders/’ ) with home_url( ‘/en/my-account/orders/’ ) in English version?

    • #39554
      Harry
      Support Expired

      Hi,

      Please change code to

      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></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( wc_get_account_endpoint_url( 'orders' ) ) . '">' . esc_html__( 'My Orders', '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 );
      	}
      }

      It will auto work with WPML you don’t need to change for each language.

      Kind regards

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

    • #39557
      seventalents
      Support Expired

      Thanks Harry! It’s ok!

    • #39558
      Harry
      Support Expired

      Hi,

      I see you added code in claue-child > style.css

      .jas-banner h3 {
      	color: red !important;
      }

      Please change red to your color.

      Kind regards

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

Viewing 7 reply threads

You must be logged in to reply to this topic.