Title: &#039;functions.php&#039; question
Last modified: August 21, 2016

---

# 'functions.php' question

 *  Resolved [flight1307](https://wordpress.org/support/users/flight1307/)
 * (@flight1307)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/functionsphp-question/)
 * Is it correct that not closing the code block with ‘functions.php’ is correct
   practice? i.e.
 *     ```
       <?php
   
       all your functions file code ...
       ```
   
 * instead of:
 *     ```
       <?php
   
       all your functions file code ...
   
       ?>
       ```
   
 * The reason I ask is because leaving the code block UNclosed is the only thing
   that stops my site page/s and WordPress login page from breaking or turning into
   blank pages. Thank you in advance.
 * IFlight

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/functionsphp-question/#post-4857248)
 * > Is it correct that not closing the code block with ‘functions.php’ is correct
   > practice?
 * Not closing the end of the file with `?>` is considered by some (including myself)
   to be best practice because:
 * 1. The closing `?>` is superfluous given that PHP will close when the file closes
 * 2. It reduces the potential for “headers already sent” errors.
 * Does that help.
 *  Thread Starter [flight1307](https://wordpress.org/support/users/flight1307/)
 * (@flight1307)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/functionsphp-question/#post-4857255)
 * Yes, thank you. It does help. I’ve been following this tutorial:
 * [http://blog.teamtreehouse.com/responsive-wordpress-bootstrap-theme-tutorial](http://blog.teamtreehouse.com/responsive-wordpress-bootstrap-theme-tutorial)
 * and it’s all working correctly now. It’s much easier to work with Bootstrap alone.
   When you associate Bootstrap with WordPress, things break and go weird a lot.
   I don’t want to just drag in a bunch of plugins. I want to understand the coding
   issues. So it’s good to get a few fundamental mysteries answered, and this has
   been one. Thank you, Esmi.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/functionsphp-question/#post-4857257)
 * No problem. Glad I could help 🙂

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/functionsphp-question/#post-4857257)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
