Find out if request is for custom post type archive before query runs

Use the hook pre_get_post see codex

Leave a Comment