Hide Photos tab

This topic contains 4 replies, has 3 voices, and was last updated by  memorex13 4 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #516693

    memorex13
    Expired Member
    Post count: 540

    hi, @giri
    I would like to do the same Hide Photos tab (gallery) if only 1 image

    https://wpgeodirectory.com/support/topic/hide-photos-tab-gallery-if-only-1-image/#post-516689

    Therefore I tried the link code and the same thing happens to me. It does not work correctly.

    Thank you

    #516694

    memorex13
    Expired Member
    Post count: 540
    This reply has been marked as private.
    #516734

    Alex Rollin
    Moderator
    Post count: 27815

    On which page, link please?
    And where have you added the snippet, link please?

    #516737

    Naveen Giri
    Moderator
    Post count: 1559

    hi memorex13,

    the mention code should work for you. i have added it.
    please share place link. if its not working for any place.

    
    add_action( 'wp_head', function () { ?>
    	<script>
    
    		jQuery(document).ready(function(){
    	if ( jQuery('.geodir-image-wrapper ul.geodir-gallery li').length <= 1  ) {
    		jQuery('.geodir-tab-head *[data-tab="#post_images"]').parent().hide();
    		jQuery('#post_imagesTab').hide();	
    	}	
    })
    
    	</script>
    <?php } );

    Thanks

    #516852

    memorex13
    Expired Member
    Post count: 540

    Hi,

    Yes, it works perfectly,

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket