Show Product Tab when Product Description is empty
-
Hi,
I want to show product tab when product description is empty.
using this codesif (empty($content)) { $terms = wp_get_post_terms( $post->ID, 'product_cat' ); foreach ( $terms as $term ) $categories[] = $term->slug; if ( in_array( 'api-back-issues', $categories ) ) { ?> <div class="short_description"> <h2 style="border-bottom:none !important;padding-bottom:10px;">Inside this issue...</h2> </div> <script type='text/javascript' src='https://103.18.109.102/~apimagaz/wp-content/themes/jarida/js/tabs.min.js?ver=4.4.2'></script> <script type="text/javascript"> jQuery(document).ready(function($){ jQuery("ul.tabs-nav").tabs("> .pane"); }); </script> <div class="post-tabs"> <ul class="tabs-nav"><li>Features</li><li>Editor’s Note</li><li>Regulars</li><li>States</li></ul> <div class="pane"> <?php the_field('features_tab'); ?> </div> <div class="pane"> <div class="editor_profile_image"> <img src="<?php the_field('editor_profile_image'); ?>"> </div> <?php the_field('editors_tab'); ?> </div> <div class="pane"> <?php the_field('regulars_tab'); ?> </div> <div class="pane"> <?php the_field('states_tab'); ?> </div> </div> <?php } } else { the_content(); } ?>
but, tab only showing when the product main content is not empty.
and don’t appear when emptyanyone here have the same issue?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Show Product Tab when Product Description is empty’ is closed to new replies.