Cannot modify header information – headers already sent by pluggable.php

Question

I’m trying to develop a simple plugin but I’m having a problem: I have a custom WP_List_Table in an admin page, but when I click on a button like “Edit Row” or “Delete Row” it performs some expected action and try to refresh the page using “wp_redirect()”. This is causing a problem:

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/wordpress/wp-includes/formatting.php:5652) in /opt/lampp/htdocs/wordpress/wp-includes/pluggable.php on line 1265

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/wordpress/wp-includes/formatting.php:5652) in /opt/lampp/htdocs/wordpress/wp-includes/pluggable.php on line 1268

I have just the Advanced Custom Fields plugin installed and I’m using the default theme. At the moment, my plugin is JUST this code below (I got it here https://www.sitepoint.com/using-wp_list_table-to-create-wordpress-admin-tables/):

I know this is a very asked question here, but I tried to search a lot before asking, nothing helped me.

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

0
, , , Julio Cesar de Azeredo 2 months 0 Answers 38 views 0

Leave an answer