No TAB Activation till clicked

Hi,

I currently am building this site by editing the fixer theme from upfront builder. Currently the first tab is always visible upon loading. Is there a way the tab can be closed and no tab is selected initially, then once someone clicks on one it opens the information, then if they click the heading of the tab again it will disappear? The site is here: http://parish.parracatholic.org/parishmulti/stpaultheapostlewinstonhills/

  • Nithin

    Hi comms2,

    Hope you are doing good today. :slight_smile:

    Please try the following code, and check whether it works fine:

    <?php
    function upfront_remove_tabs() {
    	echo "<script>
    	jQuery(document).ready(function() {
    		jQuery('.tabs-tab').removeClass('tabs-tab-active');
    		jQuery('.utab-content').removeClass('utab-content-active');
    	});
    </script>";
    }
    add_action('wp_footer', 'upfront_remove_tabs' );

    You'll have to add the above code using mu-plugins. You'll have to create /mu-plugins folder inside /wp-content folder, and create a php file(any name eg: test.php) inside the mu-plugins folder, and past the above code in it.

    For more details about mu-plugins, you'll have to check this link for more info:
    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    I tested the above code, and it seems to work fine. Please let us know how that goes, have a nice day. :slight_smile:

    Kind Regards,
    Nithin