Home Forums WoodMart support forum Register form / Pop Up

Register form / Pop Up

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #534179

    DEVPOM1234
    Participant

    Hello,
    I Would Like to know how can I add text and link in the register / login form pop up
    I need to ad Policy and Conditions

    Attachments:
    You must be logged in to view attached files.
    #534686

    Hung Pham
    Participant

    Hi pomelo.alexia,

    Thanks for reaching to us and appreciate your patience.

    Please add below Custom Code to the functions.php file in your child theme.

    if ( ! function_exists( 'woodmart_sidebar_login_form' ) ) {
    	function woodmart_sidebar_login_form() {
    		if ( ! woodmart_woocommerce_installed() || is_account_page() ) {
    			return;
    		}
    
    		$settings     = whb_get_settings();
    		$login_side   = isset( $settings['account'] ) && $settings['account']['login_dropdown'] && $settings['account']['form_display'] == 'side';
    		$account_link = get_permalink( get_option( 'woocommerce_myaccount_page_id' ) );
    		$page_id      = woodmart_get_the_ID() ? woodmart_get_the_ID() : get_option( 'woocommerce_myaccount_page_id' );
    		$redirect_url = apply_filters( 'woodmart_my_account_side_login_form_redirect', get_permalink( $page_id ) );
    
    		$wrapper_classes = '';
    
    		if ( 'light' === whb_get_dropdowns_color() ) {
    			$wrapper_classes .= ' color-scheme-light';
    		}
    
    		$position = is_rtl() ? 'left' : 'right';
    
    		$wrapper_classes .= ' wd-' . $position;
    
    		if ( ! $login_side || is_user_logged_in() ) {
    			return;
    		}
    
    		woodmart_enqueue_inline_style( 'header-my-account-sidebar' );
    		woodmart_enqueue_inline_style( 'woo-mod-login-form' );
    		?>
    			<div class="login-form-side wd-side-hidden woocommerce<?php echo esc_attr( $wrapper_classes ); ?>">
    				<div class="wd-heading">
    					<span class="title"><?php esc_html_e( 'Sign in', 'woodmart' ); ?></span>
    					<div class="close-side-widget wd-action-btn wd-style-text wd-cross-icon">
    						<a href="#" rel="nofollow"><?php esc_html_e( 'Close', 'woodmart' ); ?></a>
    					</div>
    				</div>
    
    				<?php if ( ! is_checkout() ) : ?>
    					<?php woocommerce_output_all_notices(); ?>
    				<?php endif; ?>
    
    				<?php woodmart_login_form( true, $redirect_url, false, true, $redirect_url ); ?>
    
    				<div class="create-account-question">
    					<p><?php esc_html_e( 'No account yet?', 'woodmart' ); ?></p>
    					<a href="<?php echo esc_url( add_query_arg( 'action', 'register', $account_link ) ); ?>" class="btn btn-style-link btn-color-primary create-account-button"><?php esc_html_e( 'Create an Account', 'woodmart' ); ?></a>
    				</div>
    			</div>
    		<?php
    	}
    
    	add_action( 'woodmart_before_wp_footer', 'woodmart_sidebar_login_form', 160 );
    }

    You can add custom text / links here https://prnt.sc/NU8Xz5ObA8oe

    Regards,

Viewing 2 posts - 1 through 2 (of 2 total)