Child Theme functions.php "Cannot modify header" error
-
Hi,
I have a child theme with a functions.php that I use to change some of the wp functionality. Everything was working fine until I added the follow code to the file
<?php /** * No Feeds */ function disable_feed() { wp_redirect( home_url() ); exit; } add_action('do_feed', 'disable_feed', 1); add_action('do_feed_rdf', 'disable_feed', 1); add_action('do_feed_rss', 'disable_feed', 1); add_action('do_feed_rss2', 'disable_feed', 1); add_action('do_feed_atom', 'disable_feed', 1); function removeHeadLinks() { remove_action( ‘wp_head’, ‘feed_links_extra’, 3 ); remove_action( ‘wp_head’, ‘feed_links’, 2 ); remove_action( ‘wp_head’, ‘rsd_link’ ); } add_action('init', 'removeHeadLinks'); ?> <?php function disable_category_tag_feed () { return; } add_filter('category_feed_link', 'disable_category_tag_feed'); ?>The code above prevents me from accessing /wp-admin and give me the following error: “Warning: Cannot modify header information – headers already sent by (output started at /home/arseniy/public_html/wp-content/themes/businesspro_child/functions.php:13) in /home/arseniy/public_html/wp-includes/pluggable.php on line 876”
What can I do?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Child Theme functions.php "Cannot modify header" error’ is closed to new replies.