how can i redirect page using custom link ex:-
wc_get_template( 'myaccount/dashboard.php', array(
'current_user' => get_user_by( 'id', get_current_user_id() ),
) );
and i have hidden div in myaccount page.
<div class="alert success">
<span class="closebtn">×</span>
<strong>Registration Success!</strong> Check Email.
</div>
how to show div button if the following link is [register->myaccount]
and if i use another link, like [login->myaccount]
The div will hide again. thanks
just try this
wp_safe_redirect( wc_get_page_permalink( 'myaccount' )."?base=register" );
and html like below
<div class="alert success" style="<?php echo (isset($_GET['base']) && $_GET['base'] == "register") ? 'display:block' : 'display:none' ; ?>">
<span class="closebtn">×</span>
<strong>Registration Success!</strong> Check Email.
</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.