Title: [Plugin: Custom Field Template] PHP Notice when WP_DEBUG is on
Last modified: August 19, 2016

---

# [Plugin: Custom Field Template] PHP Notice when WP_DEBUG is on

 *  [Nabha Cosley](https://wordpress.org/support/users/nabha/)
 * (@nabha)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-php-notice-when-wp_debug-is-on/)
 * Hi Hiroaki,
 * I’m developing and the plugin is throwing this error when I’m in the admin panel.
 * Notice: Undefined variable: post in C:\wwwroot\anandala\wp-content\plugins\custom-
   field-template\custom-field-template.php on line 538
 * A hack sort of fix is to add this before line 530:
 *  if ( isset( $post ) ) {
    $post_type = $post->post_type; } else { $post_type 
   = ”; }
 * Hoping it’s easy for you to make the plugin WP_DEBUG-compatible.
 * Thank you!
 * [http://wordpress.org/extend/plugins/custom-field-template/](http://wordpress.org/extend/plugins/custom-field-template/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Nabha Cosley](https://wordpress.org/support/users/nabha/)
 * (@nabha)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-php-notice-when-wp_debug-is-on/#post-1744893)
 * Oh, and of course $post->post_type==’page’ on line 530 has to change to $post_type
   ==’page’, using the above code.
 * I also forgot to add my thanks to you for developing the plugin, and spending
   so much time with it. Among other things, it’s a real help in speeding development
   time for more complex things.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Custom Field Template] PHP Notice when WP_DEBUG is on’ 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/)

 * 1 reply
 * 1 participant
 * Last reply from: [Nabha Cosley](https://wordpress.org/support/users/nabha/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-php-notice-when-wp_debug-is-on/#post-1744893)
 * Status: not resolved