Child theme functions.php do I use php open and close tags?

Opening tags are required, closing tags are only needed if you have other code (HTML, CSS) after them in the same file. See PHP manual.

A closing tag with nothing after it may lead to problems with included files if they contain a BOM. That’s one of the reasons why all optional closing tags were removed for WordPress 3.4 in core files. Follow this style. It’s useful.

Here is an example from Automattic’s _s theme’s functions.php.

Leave a Comment