Ready to get started?Download WordPress


Developer's Custom Fields
[resolved] Any way to include the boxes on pages also? (3 posts)

  1. bjones1985
    Posted 1 year ago #

    Just wondering if there is way to include the fields on pages also? If not can you give lead me in the direction to edit this plugin to do that as well? Would be nice to have both posts and pages for this plugin. Would rather use this for everything instead of using this and another class to add custom fields to pages.



  2. Sean
    Posted 1 year ago #

    You've probably figured this out by now, but you can include any post type by including it in scope:

    slt_cf_register_box( array(
        'type'      => 'post',
        'title'     => 'Featured Project',
        'id'        => 'featured_project',
        'context'   => 'normal',
        'priority'  => 'high',
        'fields'    => array(
                  'name'          => 'featured_title',
                  'label'         => 'Title',
                  'type'          => 'text',
                  'scope'         => array( 'page', 'post', 'my_custom_post_type'),
                  'capabilities'  => array( 'edit_posts' )

    The full spec for scope is in the docs

  3. Steve Taylor
    Plugin Author

    Posted 1 year ago #

    @Sean, thanks for chipping in. @bjones1985, for some reason I got a notification for Sean's reply but not your post. Hope you got things working for you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.