Home Forums WoodMart support forum About The Retail Theme’s popup

About The Retail Theme’s popup

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #549861

    hellovaper21
    Participant

    Where to set this popup? I want to change the age of this pop-up window.

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

    Luke Nielsen
    Keymaster

    Hello,

    The age verify popup can be adjusted via Theme Settings -> General -> Age verify popup: https://prnt.sc/RB7PxIu53Hr-

    Kind Regards

    #549880

    hellovaper21
    Participant

    How to change the age number on the button?

    #549885

    Luke Nielsen
    Keymaster

    Hello,

    I suggest using the “Loco translate” for that purpose. Here is our article on how to use that: https://xtemos.com/docs-topic/translate-woodmart-theme-with-loco-translate/ , in such a way you can change any text you want to the desired.

    Kind Regards

    #549890

    hellovaper21
    Participant

    I mean that button on the picture.
    How do I change this to “18” on the options button shown like the picture?
    I want to change to 21. Where to set it?

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

    Luke Nielsen
    Keymaster

    Hello,

    There is no such option in Theme Settings, so I suggested using the “Loco translate” plugin for that. This plugin is usable when you want to change some text from English to English.

    If you do not want to use Loco to change the text, you can try to use the code below:

    function woodmart_age_verify_popup() {
    		if ( ! woodmart_get_opt( 'age_verify' ) ) {
    			return;
    		}
    
    		woodmart_enqueue_js_library( 'magnific' );
    		woodmart_enqueue_js_script( 'age-verify' );
    		woodmart_enqueue_inline_style( 'age-verify' );
    		woodmart_enqueue_inline_style( 'mfp-popup' );
    
    		$wrapper_classes = ' color-scheme-' . woodmart_get_opt( 'age_verify_color_scheme' );
    
    		?>
    			<div class="mfp-with-anim wd-popup wd-age-verify<?php echo esc_attr( $wrapper_classes ); ?>">
    				<div class="wd-age-verify-text reset-last-child">
    					<?php echo do_shortcode( woodmart_get_opt( 'age_verify_text' ) ); ?>
    				</div>
    
    				<div class="wd-age-verify-text-error reset-last-child">
    					<?php echo do_shortcode( woodmart_get_opt( 'age_verify_text_error' ) ); ?>
    				</div>
    
    				<div class="wd-age-verify-buttons">
    					<a href="#" rel="nofollow noopener" class="btn wd-age-verify-allowed">
    						<?php esc_html_e( 'I am 18 or Older', 'woodmart' ); ?>
    					</a>
    
    					<a href="#" rel="nofollow noopener" class="btn wd-age-verify-forbidden">
    						<?php esc_html_e( 'I am Under 18', 'woodmart' ); ?>
    					</a>
    				</div>
    			</div>
    		<?php
    }
    
    add_action( 'woodmart_before_wp_footer', 'woodmart_age_verify_popup', 400 );

    Paste it to the functions.php file in your child theme and change the text per your needs. Clear the cache and recheck the issue.

    Kind Regards

Tagged: 

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