"Cannot Modify Headers" Error on specific directory URI
-
Hi all, I hope this is the right forum for this. I’m getting a weird “Cannot modify headers” error, and I’ve tried all the usual fixes for it (whitespace, BOM, etc), so I figured it was time to ask.
At chriselliottart.com/design everything works fine. Then, at chriselliottart.com/design/ I get the following error:
Warning: Cannot modify header information – headers already sent by (output started at /home2/chrisel2/public_html/index.php:6) in /home2/chrisel2/public_html/home/wp-includes/pluggable.php on line 1178
(I should mention this occurs with all other category and child category pages as well, but not with the index)
The line in question that the error is happening on is actually IN the header of index.php, and is this:
<link href='http://fonts.googleapis.com/css?family=Raleway:400' rel='stylesheet' type='text/css'>The weird thing is that no matter how I move the lines of code in the header around, the error always occurs on line 6. I think this has something to do with wordpress’s built-in auto-redirect function for URIs it believes to be incorrect (/design vs /design/). I think somehow this has run afoul of my other code, but I don’t know where to begin looking. The weird thing is that /design is a category page, so I’m not sure why the issue is occurring in index. Has anyone else run into this issue? I’ll post the entire header where the error occurs below:
<head> <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url');?>" media="screen"> <link href='http://fonts.googleapis.com/css?family=Raleway:400' rel='stylesheet' type='text/css'> <script type="text/javascript">var ajaxurl = "http://www.chriselliottart.com/home/wp-admin/admin-ajax.php";</script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <title>ChrisElliottArt</title> <meta name="description" content="Hello! My name is Chris. I'm a designer, photographer, and coder based in Philadelphia, and this is my website."> </head>Additional info would be that the theme is completely custom and uses an AJAJ data request to build the individual posts. This will likely be changing as I’m in the process of restructuring the page flow, and likely won’t need that anymore.
The topic ‘"Cannot Modify Headers" Error on specific directory URI’ is closed to new replies.