Developer's Custom Fields
Trouble With Scope using Template (3 posts)

  1. Dinesh Kesarwani
    Posted 3 years ago #

    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' ))


  2. Steve Taylor
    Plugin Author

    Posted 3 years ago #

    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' ))

  3. Dinesh Kesarwani
    Posted 3 years ago #

    OK... It works for me. Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Developer's Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic