Help > Forum > Categories > Collapsing the list of subcategories

Collapsing the list of subcategories

You can follow the directions below to collapse the list of subcategories shown for a category on the Categories page. Users will be able to click an icon to expand the list.

  1. Log in to your Website Toolbox account.
  2. Click the Appearance link.
  3. In the Appearance menu, click the HTML link.
  4. Insert the following code into the "Forum Head Tag HTML Code".
    <style>
    	.columns-wrapper .subforum-list:not(.subcategory-open) {
    		width: 60px;
    		cursor: copy;
    		position: relative;
    		z-index: 2;
    	}
    	.columns-wrapper .subforum-list:not(.subcategory-open) > a {
    		display: none;
    	}
    	.columns-wrapper .subforum-list:not(.subcategory-open):after {
    		content: '';
    		display: inline-block;
    		height: 6px;
    		width: 6px;
    		border-radius: 100%;
    		vertical-align: 2px;
    		margin-left: 5px;
    		border: 3px solid;
    		box-shadow: 10px 0 0, 20px 0 0;
    		opacity: 0.65;
    	}
    </style>
    <script>
    	window.addEventListener("load", function(event) {
    		jQ('.columns-wrapper .subforum-list:not(.subcategory-open)').click(function(){
    			jQ(this).addClass('subcategory-open');
    		});
    	});
    </script>
    
  5. Save your changes.

Collapsed subcategories

Expanded subcategories


If you still need help, please contact us.