Title: Using PHP in template editor
Last modified: July 8, 2024

---

# Using PHP in template editor

 *  [PatrickRiepe](https://wordpress.org/support/users/patrickriepe/)
 * (@patrickriepe)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/using-php-in-template-editor/)
 * I needed to use some PHP to create one of my Pod templates. The php worked fine,
   but is it safe and/or a best practice to include php right in the template editor?
   I tried moving the php to an external file but I wasn’t getting it to work. How
   do I do that?

The topic ‘Using PHP in template editor’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [PatrickRiepe](https://wordpress.org/support/users/patrickriepe/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/using-php-in-template-editor/)
 * Status: not resolved