Digital experiences for all disciplines
New Landing › How can we help? › Atelier › How do I redirect the "Sing UP" button on my address
New Landing › How can we help? › Atelier › How do I redirect the "Sing UP" button on my address
- This topic has 8 replies, 2 voices, and was last updated 9 years by Kyle – SUPPORT.
-
Posted in: Atelier
-
June 25, 2015 at 10:21 am #188421
How do I redirect the “Sing UP” button on my address.
At this point, one refers to example.com/my-account, I need to refer to another page – example.com/register. Where are the settings?Attachments:
You must be logged in to view attached files.June 25, 2015 at 10:41 am #188432Hi
You’ll need to be using a child theme, add this to your functions.php file:
/* ACCOUNT ================================================== */ if ( ! function_exists( 'sf_get_account' ) ) { function sf_get_account() { // 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 ); $register_url = apply_filters( 'sf_header_register_url', wp_registration_url() ); $my_account_link = apply_filters( 'sf_header_myaccount_url', $my_account_link ); if ( get_option( 'woocommerce_enable_myaccount_registration' ) && $myaccount_page_id ) { $register_url = apply_filters( 'sf_header_register_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' ); $account_output = ""; // LINKS + SEARCH OUTPUT $account_output .= '<nav class="std-menu">' . "\n"; $account_output .= '<ul class="menu">' . "\n"; $account_output .= '<li class="parent account-item">' . "\n"; $account_output .= '<a href="#"><i class="sf-icon-account"></i></a>' . "\n"; $account_output .= '<ul class="sub-menu">' . "\n"; if ( is_user_logged_in() ) { $account_output .= '<li class="menu-item"><a href="' . $my_account_link . '" class="admin-link">' . __( "My Account", "swiftframework" ) . '</a></li>' . "\n"; $account_output .= '<li class="menu-item"><a href="' . $logout_url . '">' . __( "Sign Out", "swiftframework" ) . '</a></li>' . "\n"; } else { $account_output .= '<li class="menu-item"><a href="' . $login_url . '">' . __( "Login", "swiftframework" ) . '</a></li>' . "\n"; $account_output .= '<li class="menu-item"><a href="' . $register_url . '">' . __( "Sign Up", "swiftframework" ) . '</a></li>' . "\n"; } if ( $show_sub && $sub_code != "" ) { $account_output .= '<li class="parent"><a href="#">' . __( "Subscribe", "swiftframework" ) . '</a>' . "\n"; $account_output .= '<ul class="sub-menu">' . "\n"; $account_output .= '<li><div class="header-subscribe clearfix">' . "\n"; $account_output .= do_shortcode( $sub_code ) . "\n"; $account_output .= '</div></li>' . "\n"; $account_output .= '</ul>' . "\n"; $account_output .= '</li>' . "\n"; } if ( $show_translation ) { $account_output .= '<li class="parent aux-languages"><a href="#">' . __( "Language", "swiftframework" ) . '</a>' . "\n"; $account_output .= '<ul class="header-languages sub-menu">' . "\n"; if ( function_exists( 'sf_language_flags' ) ) { $account_output .= sf_language_flags(); } $account_output .= '</ul>' . "\n"; $account_output .= '</li>' . "\n"; } $account_output .= '</ul>' . "\n"; $account_output .= '</li>' . "\n"; $account_output .= '</ul>' . "\n"; $account_output .= '</nav>' . "\n"; // RETURN return $account_output; } }
and edit this line
$account_output .= '<li class="menu-item"><a href="' . $register_url . '">' . __( "Sign Up", "swiftframework" ) . '</a></li>' . "\n";
replace
' . $register_url . '
with your link
– Kyle
June 25, 2015 at 11:38 am #188475This reply has been marked as private.June 25, 2015 at 11:45 am #188483Can you provide me with a link and login so I can check?
– Kyle
June 25, 2015 at 11:46 am #188489This reply has been marked as private.June 25, 2015 at 11:48 am #188490This reply has been marked as private.June 25, 2015 at 12:42 pm #188531For me it’s taking me to this page: http://premium-tea.com/register/
– Kyle
June 25, 2015 at 1:40 pm #188584Thank you Kyle, on my computer normally, but tablet no work, probably cache. But thanks anyway!
June 25, 2015 at 1:45 pm #188588No problem
-
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.