Which action is triggered before final output? October 24, 2022 by Tarik Billa I often use template_redirect. You can also try wp. List of WP Actions