Home › Forums › WoodMart support forum › About The Retail Theme’s popup
About The Retail Theme’s popup
- This topic has 5 replies, 2 voices, and was last updated 9 months, 1 week ago by Luke Nielsen.
-
AuthorPosts
-
March 18, 2024 at 12:07 pm #549861
hellovaper21ParticipantWhere 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.March 18, 2024 at 12:30 pm #549875
Luke NielsenKeymasterHello,
The age verify popup can be adjusted via Theme Settings -> General -> Age verify popup: https://prnt.sc/RB7PxIu53Hr-
Kind Regards
March 18, 2024 at 12:35 pm #549880
hellovaper21ParticipantHow to change the age number on the button?
March 18, 2024 at 12:40 pm #549885
Luke NielsenKeymasterHello,
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
March 18, 2024 at 1:02 pm #549890
hellovaper21ParticipantI 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.March 18, 2024 at 1:09 pm #549895
Luke NielsenKeymasterHello,
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
-
AuthorPosts
Tagged: popup
- You must be logged in to create new topics. Login / Register