Title: [Plugin: Developer&#039;s Custom Fields] Trouble With Scope using Template
Last modified: August 20, 2016

---

# [Plugin: Developer's Custom Fields] Trouble With Scope using Template

 *  [Dinesh Kesharwani](https://wordpress.org/support/users/cyberwani/)
 * (@cyberwani)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-developers-custom-fields-trouble-with-scope-using-template/)
 * I am working with portfolio post type. I am adding meta field in page with template“
   page-portfolio.php”. I used the below code. but it is not working and meta box
   is displaying also on page with template other than “page-portfolio.php”.
 * `'scope' => array('page','template'=> array( 'page-portfolio.php' ))`
 * [http://wordpress.org/extend/plugins/developers-custom-fields/](http://wordpress.org/extend/plugins/developers-custom-fields/)

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

 *  Plugin Author [Steve Taylor](https://wordpress.org/support/users/gyrus/)
 * (@gyrus)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-developers-custom-fields-trouble-with-scope-using-template/#post-2626238)
 * The scope parameter is currently “inclusive”, so the above would apply the meta
   box to all pages as well as ones that have the template ‘page-portfolio.php’ (
   obviously redundant).
 * Did you try this?
 * `'scope' => array('template'=> array( 'page-portfolio.php' ))`
 *  Thread Starter [Dinesh Kesharwani](https://wordpress.org/support/users/cyberwani/)
 * (@cyberwani)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-developers-custom-fields-trouble-with-scope-using-template/#post-2626349)
 * OK… It works for me. Thanks

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

The topic ‘[Plugin: Developer's Custom Fields] Trouble With Scope using Template’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/developers-custom-fields.svg)
 * [Developer's Custom Fields](https://wordpress.org/plugins/developers-custom-fields/)
 * [Support Threads](https://wordpress.org/support/plugin/developers-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/developers-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/developers-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/developers-custom-fields/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Dinesh Kesharwani](https://wordpress.org/support/users/cyberwani/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-developers-custom-fields-trouble-with-scope-using-template/#post-2626349)
 * Status: not resolved