Hide tab if content is empty
-
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 4 years, 8 months ago by
Jan Dembowski.
The page I need help with: [log in to see the link]
-
This topic was modified 4 years, 8 months ago by
-
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://ww.wp.xz.cn/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.
The topic ‘Hide tab if content is empty’ is closed to new replies.