Title: Simple php question
Last modified: August 19, 2016

---

# Simple php question

 *  [kah22](https://wordpress.org/support/users/kah22/)
 * (@kah22)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/)
 * I wish to install the Post Thumbnail option. What I’ve picked up on various Forums
   is that before I can see it in the write post page I have to past some code into
   my functions.php file – add_theme_support(‘post-thumbnails’); – is that correct?
 * My question is a rather elementary one. Where does the line go? Here is the last
   few lines of my custom.php file but I don’t know how to add it. I would appreciate
   some advice.
 * > case 2 :
   >  case 3 : case 4 : case 5 : case 6 : return “WEEK( DATE_SUB( $column,
   > INTERVAL $start_of_week DAY ), 0 )”; } }
   > ?>
 * It would be nice if there was a plug-in that would do all of this for me 🙂
 * Thanks
 * Kevin

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693480)
 * Add this at the very end of the file. Be VERY careful not to leave any blank 
   lines between the existing final `>?` and the new line. Also, do not leave an
   extra empty line after this one or you will get the ‘Cannot modify header … ‘
   error.
 * `<?php add_theme_support('post-thumbnails'); ?>`
 *  Thread Starter [kah22](https://wordpress.org/support/users/kah22/)
 * (@kah22)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693496)
 * vtxzzy thanks for your answer, but I’m having trouble, here’s where I’m at:
    
   original code: return “WEEK( DATE_SUB( $column, INTERVAL $start_of_week DAY ),
   0 )”; } }
 * ?>
 * added:
    <?php add_theme_support(‘post-thumbnails’); ?>
 * new code:
    return “WEEK( DATE_SUB( $column, INTERVAL $start_of_week DAY ), 0 )”;}}
 * ?>
    <?php add_theme_support(‘post-thumbnails’); ?>
 * been VERY, VERY careful not to leave any space between ?> and additional code.
   No white space at end either.
 * Getting the following error
    Fatal error: Call to undefined function the_post_thumbnail()
   in /websites/LinuxPackage04/ba/bi/es/my-domain.com/public_html/wp-includes/functions.
   php on line 4300
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693512)
 * What version of WP are you running?
 *  Thread Starter [kah22](https://wordpress.org/support/users/kah22/)
 * (@kah22)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693514)
 * 3.0.1
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693528)
 * The message has nothing to do with extra lines or spaces, so that looks OK. The
   version of WP is right.
 * Check if you have the file wp-includes/post-thumbnail-template.php.
 *  Thread Starter [kah22](https://wordpress.org/support/users/kah22/)
 * (@kah22)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693529)
 * Yes, wp-includes/post-thumbnail-template.php is there
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693530)
 * I’m running out of things to check. I guess it is possible that the add_theme_support
   line needs to be higher up in the functions.php, but I have not run into that
   before.
 * In order to know exactly how to put it in, please post the first 20 lines or 
   so of your functions.php. Be sure to enclose the lines in backticks.
 *  Thread Starter [kah22](https://wordpress.org/support/users/kah22/)
 * (@kah22)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693542)
 * Thanks for your support vtxyzzy
 * This was a premium theme (Thesis) that I was working with and I posed the same
   question there. The answer that came back said to change the custom-function.
   php file NOT the WordPress function.php file and add
 *     ```
       <?php add_theme_support('post-thumbnails'); ?>
       add_theme_support('post-thumbnails');
       ```
   
 * again I got an error message but decided to try single lines and when I put `
   add_theme_support('post-thumbnails');` in on its own the plugin seem to be satisfied.
 * Again many thanks for your help. Hopefully you advice and this will help other
   WordPressers!
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693545)
 * Glad you got it to work. Now, please use the dropdown at top right to mark this
   topic ‘Resolved’ so anyone searching for this problem will see that there is 
   a solution.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Simple php question’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/simple-php-question-4/#post-1693545)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
