Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Uplift › Edit where the "My Account" links you to in the header
New Landing › How can we help? › Themeforest Theme Support › Uplift › Edit where the "My Account" links you to in the header
- This topic has 3 replies, 2 voices, and was last updated 8 years by David Martin – Support.
-
Posted in: Uplift
-
October 10, 2016 at 8:32 am #295408
Hi,
Is it possible to change where the “my account” icon links you to on this site? http://athleteperks.thenorthernfoundry.com/
We ideally want it to link to this page instead: http://athleteperks.thenorthernfoundry.com/profile/
Is this possible?
Thanks,
Amber
October 10, 2016 at 9:12 am #295413Hi Amber,
You will need to modify the core theme files via a child theme.
Please install and activate the supplied child theme, inside the child theme
functions.php
file you can paste this function and amend the link code as needed./* AUX LINKS ================================================== */ if ( ! function_exists( 'sf_aux_links' ) ) { function sf_aux_links( $position, $alt_version = false, $header_version = "" ) { // VARIABLES $login_url = wp_login_url(); $logout_url = wp_logout_url( home_url() ); $my_account_link = get_admin_url(); $myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' ); if ( $myaccount_page_id ) { $my_account_link = get_permalink( $myaccount_page_id ); $logout_url = wp_logout_url( get_permalink( $myaccount_page_id ) ); $login_url = get_permalink( $myaccount_page_id ); if ( get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) { $logout_url = str_replace( 'http:', 'https:', $logout_url ); $login_url = str_replace( 'http:', 'https:', $login_url ); } } $login_url = apply_filters( 'sf_header_login_url', $login_url ); $my_account_link = apply_filters( 'sf_header_myaccount_url', $my_account_link ); global $sf_options; $show_sub = $sf_options['show_sub']; $show_translation = $sf_options['show_translation']; $sub_code = __( $sf_options['sub_code'], 'swiftframework' ); $show_account = $sf_options['show_account']; $show_cart = $show_wishlist = false; if ( isset($sf_options['show_cart']) ) { $show_cart = $sf_options['show_cart']; } if ( isset($sf_options['show_wishlist']) ) { $show_wishlist = $sf_options['show_wishlist']; } $ss_enable = $sf_options['ss_enable']; $aux_links_output = $ss_enable = ""; // LINKS + SEARCH OUTPUT $aux_links_output .= '<nav class="std-menu ' . $position . '">' . "\n"; $aux_links_output .= '<ul class="menu">' . "\n"; if ( $show_account ) { if ( is_user_logged_in() ) { $aux_links_output .= '<li><a href="' . $logout_url . '">' . __( "Sign Out", "swiftframework" ) . '</a></li>' . "\n"; $aux_links_output .= '<li><a href="' . $my_account_link . '" class="admin-link">' . __( "My Account", "swiftframework" ) . '</a></li>' . "\n"; } else { $aux_links_output .= '<li><a href="' . $login_url . '">' . __( "Login", "swiftframework" ) . '</a></li>' . "\n"; } } if ( $show_sub ) { $aux_links_output .= '<li class="parent"><a href="#">' . __( "Subscribe", "swiftframework" ) . '</a>' . "\n"; $aux_links_output .= '<ul class="sub-menu">' . "\n"; $aux_links_output .= '<li><div class="header-subscribe clearfix">' . "\n"; $aux_links_output .= do_shortcode( $sub_code ) . "\n"; $aux_links_output .= '</div></li>' . "\n"; $aux_links_output .= '</ul>' . "\n"; $aux_links_output .= '</li>' . "\n"; } if ( $show_translation ) { $aux_links_output .= '<li class="parent aux-languages"><a href="#">' . __( "Language", "swiftframework" ) . '</a>' . "\n"; $aux_links_output .= '<ul class="header-languages sub-menu">' . "\n"; if ( function_exists( 'sf_language_flags' ) ) { $aux_links_output .= sf_language_flags(); } $aux_links_output .= '</ul>' . "\n"; $aux_links_output .= '</li>' . "\n"; } if ( $header_version != "header-1" ) { if ( $show_cart ) { $aux_links_output .= sf_get_cart(); } if ( class_exists( 'YITH_WCWL_UI' ) && $show_wishlist ) { $aux_links_output .= sf_get_wishlist(); } } $aux_links_output .= '</ul>' . "\n"; $aux_links_output .= '</nav>' . "\n"; // RETURN return $aux_links_output; } }
October 11, 2016 at 11:33 am #295682Hi,
Which line in this block needs amending to change the URL?
We need this URL: http://athleteperks.thenorthernfoundry.com/wp-admin/ to become this URL: http://athleteperks.thenorthernfoundry.com/profile
Thanks
October 11, 2016 at 11:49 am #295686Search for My Account.
$aux_links_output .= '<li><a href="' . $my_account_link . '" class="admin-link">' . __( "My Account", "swiftframework" ) . '</a></li>' . "\n";
-
Posted in: Uplift
You must be logged in to reply to this topic.