PHP Header Warnings on Shortcodes
-
It seems like every shortcode that I use in Code Snippets ends up getting the following PHP warning:
“Cannot modify header information. headers already sent in /wp-includes/load.php on line 300”.
I used the default HTML sample shortcode from Code Snippets:
add_shortcode( 'shortcode_name', function () { $out = '<p>write your HTML shortcode content here</p>'; return $out;} );
And also another shortcode for search bar:
add_shortcode('wpsearch', 'get_search_form');
Both of them throw PHP Warnings in the error log. should I ignore it since it’s just a warning ?!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP Header Warnings on Shortcodes’ is closed to new replies.