Title: PHP code to use in templates
Last modified: August 20, 2016

---

# PHP code to use in templates

 *  Resolved [VentureMaker](https://wordpress.org/support/users/venturemaker/)
 * (@venturemaker)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-code-to-use-in-templates/)
 * Hi,
 * I’d like to use a PHP snippet and include it in my template(s) manually instead
   of using Auto-Hook function of the plugin.
 * Is this possible?
 * At the moment Auto Hook includes `[cft template=0 format=0]` code. How would 
   I include this into template manually with PHP code?
 * [http://wordpress.org/extend/plugins/custom-field-template/](http://wordpress.org/extend/plugins/custom-field-template/)

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

 *  Plugin Author [Hiroaki Miyashita](https://wordpress.org/support/users/hiroaki-miyashita/)
 * (@hiroaki-miyashita)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-code-to-use-in-templates/#post-3445955)
 * Use the `do_shortcode()’ function.
 *     ```
       <?php
       echo do_shortcode('[cft format=0]');
       ?>
       ```
   
 *  Thread Starter [VentureMaker](https://wordpress.org/support/users/venturemaker/)
 * (@venturemaker)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-code-to-use-in-templates/#post-3445983)
 * Ha! Thanks so much. I totally forgot about this function.

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

The topic ‘PHP code to use in templates’ is closed to new replies.

 * ![](https://ps.w.org/custom-field-template/assets/icon-256x256.png?rev=1966286)
 * [Custom Field Template](https://wordpress.org/plugins/custom-field-template/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-field-template/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-field-template/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-field-template/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-field-template/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-field-template/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [VentureMaker](https://wordpress.org/support/users/venturemaker/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/php-code-to-use-in-templates/#post-3445983)
 * Status: resolved