Okay
  Public Ticket #3145761
Review Tab
Closed

Comments

  •  6
    Fabian started the conversation

    Hello, is it possible to move the review tab to the first position, so that when I navogate to the detail view of a product, the reviews get shown and not the product description?

  • [deleted] replied

    Hi Fabian,

    This question is out of the support scope but I will try to help you this time. You can add this JS code in the Theme Options > Footer > Tracking Code.

    <script>
    jQuery( document ).ready( function( $ ) {
        $( '#tab-title-reviews a' ).click();
    } );
    </script>

    Have a nice day!

  •   Fabian replied privately
  • [deleted] replied

    Hi Fabian,

    Please share your website login credentials with me so I can test this. To safely include your credentials click the Insert Credentials button in the editor toolbar (see how)

    Thanks!

  •   Fabian replied privately
  • [deleted] replied

    Hi Fabian,

    I have modified the given code to this one:

    <!-- Change Tab Position-->
    <script>
    jQuery( document ).ready( function( $ ) {
        function setActiveReviews() {
            $( '.wc-tabs > li').removeClass( 'active' ).filter( '.reviews_tab' ).addClass( 'active' );
            $( '.woocommerce-Tabs-panel' ).hide().filter( '.woocommerce-Tabs-panel--reviews' ).show();
        }
        for ( var i = 0; i <= 10; i++ ) {
            setTimeout( setActiveReviews, 50 * i );
        }
    } );
    </script>

    And the Reviews tab is made active on the page by default:

    https://d.pr/v/sRkSOF

  •  6
    Fabian replied

    Hi Arlind,

    Perfect solution, works great.
    Thank you so much for your quick and professional help and the explanation video.

    Have a great day
    Fabian