I used this conditional code to refine the snippet for autogeneration URLs. Now it leaves posts and pages alone.