• Resolved well33t

    (@well33t)


    I reordered the “customer photos” tab in first position. But the div with the photos is hidden by default

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

Viewing 15 replies - 16 through 30 (of 36 total)
  • Thread Starter well33t

    (@well33t)

    not working for me :/

    jolie102003

    (@jolie102003)

    Hi Kevin,
    where I should paste this code?

    But in others tab 2nd, 3th etc I would like leave the title, but I would like to hide or have a possibility to translate title only on first tab.

    Best Regards
    Ania

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    @well33t: not working for me either. I’m having some trouble with this. Bear with me.

    Ania:

    Don’t add the code yet.

    Is your first tab always named the same thing? We need some type of identifier for the first tab.

    Let me know.

    jolie102003

    (@jolie102003)

    Hi,

    I already paste the code but filter function is not working properly. It hides title in 2-3-th tab but not in first.

    I want to hide only in first tab.

    Best Regards
    Ania

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Ania,

    Yes – I misunderstood your question originally. Is your first tab always “Description” or do you have more than one first tab?

    jolie102003

    (@jolie102003)

    Hi,

    yes the first tap I have same name in all products.

    Where can I transpate it, because I have a different nam tab and the description below (not translate same like name first tab).

    Regards
    Ania

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi Ania,

    Try replacing the previous filter function with this:

    add_filter( 'woocommerce_product_description_heading', 'yikes_woo_customize_description_tab_title', 100 );
    
    function yikes_woo_customize_description_tab_title() {
    	echo '<h2>My Translated Tab Title</h2>';
    }

    Change the “My Translated Tab Title” to whatever you’d like.

    Also, if that doesn’t work, could you send over the URL of one of your products so I can see the tabs?

    Thanks,
    Kevin.

    jolie102003

    (@jolie102003)

    If I will have different name first tab in future how can I manage it?

    jolie102003

    (@jolie102003)

    It works but if I would like to in some product hide description and in other show. What then?

    Can you add extra box where I will enter my self what I want in each tab to vissible. It will be easer, because in some I will leave blank box in other I fill in what I want.

    Different name tab and description.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi Ania,

    Unfortunately I cannot add an extra box for you to enter your tab titles.

    How about you always hide tab titles and then you can add your own inside the content?

    This is how to always hide tab titles (for custom tabs, the default Description tab,
    and the default Additional Information tab).

    // Hide our custom tab's title
    add_filter( 'yikes_woocommerce_custom_repeatable_product_tabs_heading', '__return_false', 99 );
    
    // Hide the description tab's title
    add_filter( 'woocommerce_product_description_heading', '__return_false', 99 );
    
    // Hide the additional information tab's title
    add_filter( 'woocommerce_product_additional_information_heading', '__return_false', 99 );
    jolie102003

    (@jolie102003)

    the code it not working, so OK let’s hide description only on first tab.

    Regards

    jolie102003

    (@jolie102003)

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    There is no good way to identify which tab is “first” in order to hide the description.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @well33t,

    Replace the current code with this and let me know…

    add_action( 'wp_footer', 'yikes_expand_first_tab', 1000 );
    
    function yikes_expand_first_tab() {
    	if ( ! is_product() ) {
    		return;
    	}
    	?>
    	<script type="text/javascript">
    		jQuery( document ).ready( function() {
    			jQuery( '.customer-photos_tab > a' ).click();
                            jQuery( '.lt-tabs li a' ).touchstart( function(){ jQuery( this ).trigger( 'click' ) });
                            jQuery( '.customer-photos_tab > a' ).trigger( 'touchstart' );
    		});
    	</script>
    	<?php
    }
    jolie102003

    (@jolie102003)

    I change code to

    // Hide the description tab’s title
    add_filter( ‘woocommerce_product_description_heading’, ‘__return_false’, 99 );

    // Hide the additional information tab’s title
    add_filter( ‘woocommerce_product_additional_information_heading’, ‘__return_false’, 99 );

    and on default tab title is remove in other tabs is still vissible.
    It is not good?

Viewing 15 replies - 16 through 30 (of 36 total)
  • The topic ‘First active tab’ is closed to new replies.