How to render an object's shadow but not the object?

I’m using Cycles. How can I make an object invisible but still have the shadows the object would normally cast visible?

Thanks!

Either uncheck all ray types aside from shadow, or mix a Transparent node using Is Shadow Ray as the mix factor.

Excellent! That’s exactly what I needed to know. Thank you!

There’s probably a few ways to do this. I’ve done some shots where the shadow casting object is on a separate render layer, but still included in the scene, which means it still casts shadow on other objects. Then I just uncheck its render layer if I don’t need the object itself.