Home › Forums › Themes Support › Claue › Customization My Account Menu Dropdown Items
- This topic has 7 replies, 2 voices, and was last updated 4 years ago by Harry.
-
AuthorPosts
-
-
November 27, 2020 at 3:47 pm #39377seventalentsSupport 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. -
November 27, 2020 at 5:23 pm #39384HarrySupport 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 4 years ago by Harry.
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 4, 2020 at 10:50 pm #39476seventalentsSupport 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.
-
December 5, 2020 at 12:34 pm #39481HarrySupport 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 -
December 10, 2020 at 9:26 pm #39552seventalentsSupport Expired
ok, but how can I replace home_url( ‘/mio-account/orders/’ ) with home_url( ‘/en/my-account/orders/’ ) in English version?
-
December 10, 2020 at 11:00 pm #39554HarrySupport 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 -
December 11, 2020 at 5:17 am #39557seventalentsSupport Expired
Thanks Harry! It’s ok!
-
December 11, 2020 at 7:52 am #39558HarrySupport 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
-
-
AuthorPosts
You must be logged in to reply to this topic.