How do I disable clearance check for a layer or for only some certain elements?
You can specify a design rule for that component:

Design &gt; Rule &gt; Placement &gt; Component Clearance,

Add new rule like this:


   Advanced query: InComponent('D1')  //assume the component is 'D1'

   Constraints: 
       Min Vertical Clearance 0mil
       Min Horizontal Clearance 0mil


Then Altium Designer will not check this component's clearance.