Title: Scope Except Template
Last modified: August 30, 2016

---

# Scope Except Template

 *  [WizzyWiggs](https://wordpress.org/support/users/wizzywiggs/)
 * (@wizzywiggs)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/scope-except-template/)
 * Okay, here is the question also a suggestion:
 * When creating custom fields, I am including it on All Pages, but at some point
   I don’t want to show the fields on a specific template, instead of the page ID.
   Is this possible? The reason is because I have similar fields created for specific
   template so it gets confusing later.
 * Here is what I wish SLT did in the scope setting:
 * ‘scope’ => array( ‘page’, ‘except_template’=> ‘template-example.php’)
 * Let me know if this makes sense and also I think would be nice to have if you
   dont 🙂
 * Thank you
 * [https://wordpress.org/plugins/developers-custom-fields/](https://wordpress.org/plugins/developers-custom-fields/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Steve Taylor](https://wordpress.org/support/users/gyrus/)
 * (@gyrus)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/scope-except-template/#post-6523352)
 * This specific feature isn’t currently included, and I’m not developing the plugin
   much these days as I’m migrating to CMB2.
 * However, there’s two approaches you could take:
    1. Before registering the box, fetch the IDs of all pages with this template with
       a normal query. Then use these for `except_posts`. You could cache the IDs to
       keep things snappy.
    2. Use the `slt_cf_check_scope` hook and handle it with custom scope checking code.
 * HTH!

Viewing 1 replies (of 1 total)

The topic ‘Scope Except 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/)

## Tags

 * [template](https://wordpress.org/support/topic-tag/template/)

 * 1 reply
 * 2 participants
 * Last reply from: [Steve Taylor](https://wordpress.org/support/users/gyrus/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/scope-except-template/#post-6523352)
 * Status: not resolved