This topic has 4 replies, 2 voices, and was last updated 1 years, 7 months ago ago by Rose Tyler
Just wondering if there is any method (shortcode or css class) by using standard/build-in Xstore functionality/libraries to create my own custom tooltip ?
Xstore displays nice tooltips in backend and also Xstore tooltips are available while editing content in Elementor, so maybe I can use it on frontend at any place I want ?
I would like to display few tooltips here and there, mainly in my custom html code in “HTML Block”, but I do not want to install another plugin for such a basic/small thing 🙂
Hello, Krzysztof,
Thank you for contacting us and for using XStore.
There is no ready shortcode for such tooltips but you may add next code snippet to your child-theme/functions.php:
add_shortcode('custom_xstore_tooltip', function($atts) {
if ( !isset($atts['title']) || !isset($atts['content']))
return;
echo '<span class="mtips">'.$atts['title'].'<span class="mt-mes">'.$atts['content'].'</span></span>';
});
Examples:
Child-theme/functions.php – https://prnt.sc/pRzcBrU0Vwe4
Options example – https://prnt.sc/ZAolMIi5ecWN
Frontend – https://gyazo.com/5e256de22697541c5c6f2a96736fc0ee
Hope you find the snippet useful for your cases.
Kind Regards,
8theme team
nice 🙂 thank you very very much
Hello, Krzysztof,
You’re welcome!
We kindly ask you to rate our theme, as it will motivate our team to move forward and create even cooler things. Please follow this link to rate – https://themeforest.net/downloads
Thank you for your time and consideration.
Kind Regards,
8theme team
Tagged: customization, json, standard library, tooltip, woocommerce, wordpress, xstore
You must be logged in to reply to this topic.Log in/Sign up