oldbag66
Member
Posted 2 years ago #
Hi, just followed the post thumbnail images tutorial here, it all works - except though when i add the thumbnail in admin it goes to a page with this error:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/bradwaters.com/httpdocs/wp-content/themes/bradzz/functions.php:6) in /var/www/vhosts/bradwaters.com/httpdocs/wp-includes/pluggable.php on line 868
any ideas ?
oldbag66
Member
Posted 2 years ago #
p.s. it does actually post the thumbnail properly so it does work..BUT i dont want that error!
do you have any blank space at the top of your functions.php file?
the very first line should be <?php right at the top
if that's not the issue, throw up your functions.php in a pastebin
and also maybe a link to your site, in case viewing your source can help us
oldbag66
Member
Posted 2 years ago #
just made sure no gaps, its in pastebin, i dont know that much about the functions file, hopefully you can help!
http://wordpress.pastebin.com/KJXaAt9i
oldbag66
Member
Posted 2 years ago #
You might want to look for white space issues in /wp-includes/pluggable.php
It's a common error: http://lmgtfy.com/?q=wordpress+pluggable+error
oldbag66
Member
Posted 2 years ago #
pluggable didnt have a closing php tag at the very end, going to try that ?>
oldbag66
Member
Posted 2 years ago #
EDIT-nevermind my post here, you got it!
<?php
if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 70, 70, true ); // Normal post thumbnails
}
?>
here's how I do it, which works.... the if function stuff isn't necessary....just keeps my theme safe for older WP versions if I release it..... If it's not an issue with pluggable.php, see if maybe this code works any better
oldbag66
Member
Posted 2 years ago #
ah yes that tidys that up will do, thanks for your speedy help : )