Display the Vendor’s Knowledgebase Collapsed by Default

The knowledgebase can be frustrating since it should be very user friendly, but unfortunately it is not so much out of the box. Besides having to change the date on all your KBs to get them to display in the correct order, the list likes to load with the top article fully expanded. For me, my vendors would never scroll to even find the other 20 articles.

This very small addition to the vendor-university.php file will load all your KB articles in a collapsed list:

Just add in the highlighted line and override the vendor-university.php file in your child theme. Easy peazy.

<script type="text/javascript">
    jQuery(document).ready(function ($) {
        $(function () {
            $("#wcmp_frontend_accordian").accordion({
                speed: 'slow',
                heightStyle: "content",
                collapsible: true,
                active: false,
            });
        });
    });
</script>		

Tested and working on Woocommerce 4.8, WCMp 3.5.15

Is this no longer relevant or not working? Please let us know in the comments!

Comments on this post

Your email address will not be published. Required fields are marked *