Ekommart
You want click "create an account" to link my account page.
Please use the child theme then add code below in the functions.php file of the child theme.
1
if (!function_exists('ekommart_form_login')) {
2
function ekommart_form_login()
3
{ ?>
4
<div class="login-form-head">
5
<span class="login-form-title"><?php esc_attr_e('Sign in', 'ekommart') ?></span>
6
<span class="pull-right">
7
<a class="register-link"
8
href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?>"
9
title="<?php esc_attr_e('Register', 'ekommart'); ?>"><?php esc_attr_e('Create an Account', 'ekommart'); ?></a>
10
</span>
11
</div>
12
<form class="ekommart-login-form-ajax" data-toggle="validator">
13
<p>
14
<label><?php esc_attr_e('Username or email', 'ekommart'); ?> <span class="required">*</span></label>
15
<input name="username" type="text" required placeholder="<?php esc_attr_e('Username', 'ekommart') ?>">
16
</p>
17
<p>
18
<label><?php esc_attr_e('Password', 'ekommart'); ?> <span class="required">*</span></label>
19
<input name="password" type="password" required
20
placeholder="<?php esc_attr_e('Password', 'ekommart') ?>">
21
</p>
22
<button type="submit" data-button-action
23
class="btn btn-primary btn-block w-100 mt-1"><?php esc_html_e('Login', 'ekommart') ?></button>
24
<input type="hidden" name="action" value="ekommart_login">
25
<?php wp_nonce_field('ajax-ekommart-login-nonce', 'security-login'); ?>
26
</form>
27
<div class="login-form-bottom">
28
<a href="<?php echo wp_lostpassword_url(get_permalink()); ?>" class="lostpass-link"
29
title="<?php esc_attr_e('Lost your password?', 'ekommart'); ?>"><?php esc_attr_e('Lost your password?', 'ekommart'); ?></a>
30
</div>
31
<?php
32
}
33
}
Copied!
Choose Page My Account, Go to WooCommerce > Settings > Advanced.
To add this form, you need to install the WooCommerce plugin and go to WooCommerce->Settings of your dashboard. Click on the Privacy and Accounts section and check the option to the Allow customers to create an account on the β€œMy Account” page option.
Then check again the issue.
Last modified 1yr ago
Copy link