I'm making a Divi theme module that's gonna display user's Instagram feed on a page. I need to redirect them to Instagram authorization URL. The divi module is a PHP file.
PHP function header()
isn't working:
Warning:
Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\wp-includes\class.wp-styles.php:237) in C:\xampp\htdocs\test\wp-content\themes\Divi-child\Modules\Instagram\init.php on line 21
What different way can I use to redirect a user to this URL or am I approaching this all wrong.