• They are the elementor toggle widgets
    The first tab gets the description via shortcode,
    The second one gets the short description via shortcode.
    I want it so that if short description is empty, the tab gets deleted.

    I used this code with jquery script but cant seem to get it to work

    // Remove tehnicki karakteristiki
        function remove_tehnicki_karakteristiki() {
        	if ( !is_singular(['product']) ){ // only on product page
            global $post, $product;
            $short_description = apply_filters( 'woocommerce_short_description', $post->post_excerpt ); // get short desc
            if (empty($short_description) ) {
        		echo '<script>
        		jQuery(#elementor-tab-title-1562).hide();
        		</script>';
            } 
        }
        }

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide tab if content is empty [Elementor pro]’ is closed to new replies.