Title: Quick Functions.php Question
Last modified: August 20, 2016

---

# Quick Functions.php Question

 *  [johnb21](https://wordpress.org/support/users/johnb21/)
 * (@johnb21)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/quick-functionsphp-question/)
 * I am curious about adding new actions/filters to functions.php. Should I separate
   each action and filter inside its own <?php ?> tag? Or should it all be compiled
   into one and separated just by the semi-colon?
 * If more clarity is needed, please post it here so I can try and clarify a bit
   better.

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

 *  [fonglh](https://wordpress.org/support/users/fonglh/)
 * (@fonglh)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/quick-functionsphp-question/#post-2942377)
 * It’s fine to put them all together.
 *  [Will D. White](https://wordpress.org/support/users/willdwhite/)
 * (@willdwhite)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/quick-functionsphp-question/#post-2942382)
 * The functions.php is a PHP file. That means that by default you can start the
   file with <?php and put as much as you want – and then close the file with ?>
 * The only time you close the PHP tag is when you want to post HTML to the website(
   or run another language, I suppose). Like in your theme files like page.php or
   header.php where you would stop using PHP for a while and use HTML instead:
 * EG: <?php if(is_page()){ ?>Some cool html here<?php } ?>
 * In the example, it says “if this is a page” (using PHP) and then switches back
   to HTML for a while. Then when you’re done posting HTML code you close it back
   up with another php setting <?php } ?>
 * I hope that helps clear up how PHP works within the theme structure for ya!

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

The topic ‘Quick Functions.php Question’ is closed to new replies.

## Tags

 * [functions](https://wordpress.org/support/topic-tag/functions/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Will D. White](https://wordpress.org/support/users/willdwhite/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/quick-functionsphp-question/#post-2942382)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
