• Resolved beboptango

    (@beboptango)


    Hi,
    I’m following several courses right now, in two cases, when I, building a new theme, enable the option to upload a feature image by add_theme_support(‘post-thumbnails);, the option doesn’t work properly and when I update the page the next screen is a blank page.

    I click the browser back button to continue and can see the page was created/updated but without an image.

    No image show up in the feature-image al all in any moment.

    I work in Mac OsX 10.11.6 with MAMP 4.1.1, test in Chrome 56.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Are you sure you have the right quotes? The code you posted above will surely throw up an error. Has a missing single quote after thumbnails.

    add_theme_support( 'post-thumbnails' );

    Thread Starter beboptango

    (@beboptango)

    I wrote it bad in the post text but it’s fine in the code.

    add_theme_support('post-thumbnails');

    Thanks

    Thread Starter beboptango

    (@beboptango)

    add_theme_support('post-thumbnails');, NOT GUILTY.

    I comment it out but the blank pages still around (at this url: http://localhost/hotelspa/wp-admin/post.php)

    BUT, things started to get messy when I add this function. Quite weird!

    Thread Starter beboptango

    (@beboptango)

    Got it!

    I found this comment in a Treehouse forum:

    Nijad Kifayeh
    almost 2 years ago
    So weird.
    In case anybody else is having this “white page of death” issue, the resolution for me was simply to delete any empty lines after the closing ?> in functions.php.
    Can any of the mods explain why thee empty lines would cause this error?@

    I tried it and works!

    So, delete any empty lines after the closing ?> in functions.php. 🙂

    Thread Starter beboptango

    (@beboptango)

    Even more; I can see there’s no need to ?> at all!

    No necessity to close or “block” a file that is a single PHP as a whole.

    Lost some elegance, but avoid for sure the weird response to empty lines.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘add_theme_support(‘post-thumbnails’) > blank pages render over submit post’ is closed to new replies.