Anyone know why this URL works flawlessly: http://plumcreekgarlic.com/
But this URL leads to a Wordpress error? http://www.plumcreekgarlic.com/
Is this is a Wordpress issue or a server/ a-record/ htaccess issue?
Thanks!
myHTAccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
My functions.php file (part of a thematic child theme I built):
/* ADD CUSTOM JQUERY */
function childtheme_scripts() {?>
<script type="text/javascript" src="http://plumcreekgarlic.com/wp-content/themes/plumcreek/custom_jquery.js"></script>
<?php }
add_action('wp_head','childtheme_scripts');
?>
<?php
/* ADJUST CATEGORY TITLES
Info here: http://www.cozmoslabs.com/forums/topic/change-title-for-category-archive
*/
function street_page_title() {
$content = '';
开发者_如何学JAVA if (is_attachment()) {
$content .= '<h2 class="page-title"><a href="';
$content .= get_permalink($post->post_parent);
$content .= '" rev="attachment"><span class="meta-nav">« </span>';
$content .= get_the_title($post->post_parent);
$content .= '</a></h2>';
} elseif (is_author()) {
$content .= '<h1 class="page-title author">';
$author = get_the_author();
$content .= __('Author Archives: ', 'thematic');
$content .= '<span>';
$content .= $author;
$content .= '</span></h1>';
} elseif (is_category()) {
$content .= '<h1 class="entry-title">';
$content .= __('', 'thematic');
$content .= ' <span>';
$content .= single_cat_title('', FALSE);
$content .= '</span></h1>' . "\n";
$content .= '<div class="archive-meta">';
if ( !(''== category_description()) ) : $content .= apply_filters('archive_meta', category_description()); endif;
$content .= '</div>';
} elseif (is_search()) {
$content .= '<h1 class="page-title">';
$content .= __('Search Results for:', 'thematic');
$content .= ' <span id="search-terms">';
$content .= wp_specialchars(stripslashes($_GET['s']), true);
$content .= '</span></h1>';
} elseif (is_tag()) {
$content .= '<h1 class="page-title">';
$content .= __('Tag Archives:', 'thematic');
$content .= ' <span>';
$content .= __(thematic_tag_query());
$content .= '</span></h1>';
} elseif (is_day()) {
$content .= '<h1 class="page-title">';
$content .= sprintf(__('Daily Archives: <span>%s</span>', 'thematic'), get_the_time(get_option('date_format')));
$content .= '</h1>';
} elseif (is_month()) {
$content .= '<h1 class="page-title">';
$content .= sprintf(__('Monthly Archives: <span>%s</span>', 'thematic'), get_the_time('F Y'));
$content .= '</h1>';
} elseif (is_year()) {
$content .= '<h1 class="page-title">';
$content .= sprintf(__('Yearly Archives: <span>%s</span>', 'thematic'), get_the_time('Y'));
$content .= '</h1>';
} elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
$content .= '<h1 class="page-title">';
$content .= __('Blog Archives', 'thematic');
$content .= '</h1>';
}
$content .= "\n";
return $content;
}
add_filter('thematic_page_title', 'street_page_title');
?>
I found this thread http://wordpress.org/support/topic/cannot-modify-header-information-pluggablephp-on-line-865?replies=9
It says to check the functions.php if there are spaces before the starting <?php
tag and after the ?>
closing tag.
Quoting Shane G:
- Download the file mentioned in the error message.
- Open that file in a plain text editor
- Check that the very first characters are
- Check that the very last characters are ?>
- Place the cursor between the ? and >
- Now press the DELETE key on your computer and keep that key pressed for at least 15 seconds.
- Now type > and
- Save without pressing any other key at all.
If this fixes it then it's a WordPress problem. You might have a plugin that redirects users using www.plumcreekgarlic.com to plumcreekgarlic.com, but then as error says, header information (location) cannot be sent when output is started already.
If you have such a plugin, the delete this and use htaccess to redirect users:
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
精彩评论