Support

Account

Home Forums Add-ons Options Page Programmatically add options subpage to every CPT via PHP

Unread

Programmatically add options subpage to every CPT via PHP

  • I use the CPT UI plugin to create and manage custom post types and taxonomies on the fly.

    ACF fields in this theme are included via PHP. A field group created to manage custom post type archive header styles including background image and meta properties.

    I want to include this field group on all custom post types when they are created. Is there a way to do this programmatically instead of manually adding each CPT slug under location?

            'location' => array(
                array(
                    array(
                        'param' => 'options_page',
                        'operator' => '==',
                        'value' => 'states',
    				),
    			),
    			array(
                    array(
                        'param' => 'options_page',
                        'operator' => '==',
                        'value' => 'issues',
                    ),
    			),
            ),
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.