WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Dinesh Kesarwani
    Member
    Posted 2 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' ))

    http://wordpress.org/extend/plugins/developers-custom-fields/

  2. Steve Taylor
    Member
    Plugin Author

    Posted 2 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
    Member
    Posted 2 years ago #

    OK... It works for me. Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic