- This topic has 3 replies, 2 voices, and was last updated 6 years, 1 month ago by
Andrew Misplon.
Tagged: polestar
- AuthorPosts
- July 29, 2018 at 10:16 am #10183
pe3ksve3kParticipantDear all, I am using the free theme Polestar, and would like to ask you, how can I change the “Quick View” text. I need to translate it into my language, because it is not translated. I am open to also change it in some .php files, does not matter.
Thank you very much.July 30, 2018 at 11:59 am #10184
Andrew MisplonKeymasterHi 🙂
The easiest way would be to use the plugin Code Snippets. Once Code Snippets is installed, add a new snippet, name it as you’d like and insert as the contents:
if ( ! function_exists( 'polestar_woocommerce_quick_view_button' ) ) : /** * Quick view button. */ function polestar_woocommerce_quick_view_button() { global $product; echo '<a href="#" id="product-id-' . $product->get_id() . '" class="button product-quick-view-button" data-product-id="' . $product->get_id() . '">' . esc_html__( 'Quick View', 'polestar') . '</a>'; $gallery = $product->get_gallery_image_ids(); if ( ! empty( $gallery ) && ! has_action( 'wp_footer', 'polestar_enqueue_flexslider' ) ) { add_action( 'wp_footer', 'polestar_enqueue_flexslider' ); } } endif;
Change only the Quick View string in this function:
esc_html__( 'Quick View', 'polestar')
.Select the option to run the snippet on the front end. Save and activate. You can also do this in a child theme.
July 30, 2018 at 3:23 pm #10185
pe3ksve3kParticipantHi Andrew,
works very well! Thank you very much!! ;-).
July 30, 2018 at 6:21 pm #10191
Andrew MisplonKeymasterSuper 🙂 Glad to hear that helped.
- AuthorPosts
You must be logged in to reply to this topic.