Hello,
I am working on a new site and I am using woodmart Layouts. Inside the single product layout, I used the element “product meta value” and It worked perfectly as long as the meta_key had a value. The problem that I faced was that if the meta_key that I had set in the element was empty the value and the field was still there.
So I would like to ask if it is possible in the themes > woodmart > inc > modules > layouts > wpb > shortcodes > single-product > meta-value.php to add this kind of check
$meta_value = get_post_meta( get_the_ID(), $settings['meta_key'], true );
if ( empty($meta_value) ) {
return '';
}
so that it will not display at all the div, if there is no value inside the meta_key?
Feel free to adjust the code if something is wrong or if I miss something.
Best Regards
-
This topic was modified 9 months, 3 weeks ago by supp0rt. Reason: Fixed a typo