WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] thumbnails - cannot modify heading error (10 posts)

  1. oldbag66
    Member
    Posted 4 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 ?

  2. oldbag66
    Member
    Posted 4 years ago #

    p.s. it does actually post the thumbnail properly so it does work..BUT i dont want that error!

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    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

  4. oldbag66
    Member
    Posted 4 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

  5. oldbag66
    Member
    Posted 4 years ago #

  6. nouveller
    Member
    Posted 4 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

  7. oldbag66
    Member
    Posted 4 years ago #

    pluggable didnt have a closing php tag at the very end, going to try that ?>

  8. oldbag66
    Member
    Posted 4 years ago #

    it worked! - thanks all

  9. Rev. Voodoo
    Volunteer Moderator
    Posted 4 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

  10. oldbag66
    Member
    Posted 4 years ago #

    ah yes that tidys that up will do, thanks for your speedy help : )

Topic Closed

This topic has been closed to new replies.

About this Topic