• 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>';
            } 
        }
        }
    	
     
    • This topic was modified 3 years, 5 months ago by Jan Dembowski.

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

Viewing 1 replies (of 1 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Moved to Fixing WordPress, this is not an Developing with WordPress topic.

    Looking at your site and from what you wrote, you are an Elementor Pro v3.4.1 user. The developer can’t have a conversation with customers here. That’s not permitted for anyone.

    For pro or commercial product support please contact the developer directly on their site. This includes any pre-sales topics as well.

    https://www.ads-software.com/support/topic/customers-and-elementor-pro-users/

    As the developer is aware, commercial products are not supported in these forums. I am sure they will have no problem supporting you there.

Viewing 1 replies (of 1 total)
  • The topic ‘Hide tab if content is empty’ is closed to new replies.