You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 30, 2025. It is now read-only.
This code could replace adding a custom mu-plugin when handling postTypes:
$instance = acf_get_internal_post_type_instance( 'acf-post-type' );
if ( ! $instance ) {
return;
}
// Define our post type configuration (similar to what you'd fill in the UI)// This structure mirrors what SCF creates when you use the UI to create a post type$post_type_config = array(
'key' => 'scf_test_post_type',
'title' => 'SCF Test Type',
'post_type' => 'scf-test-type',
'description' => 'Test post type for testing',
'active' => 1,
'public' => 1,
'show_in_rest' => 1,
'publicly_queryable' => 1,
'show_ui' => 1,
'show_in_menu' => 1,
'has_archive' => 1,
'supports' => array( 'title', 'editor' ),
'labels' => array(
'name' => 'SCF Test Type',
'singular_name' => 'SCF Test Item',
),
);
// Create the post type entry in the database using SCF's internal API$result = $instance->update_post( $post_type_config );
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Uh oh!
There was an error while loading. Please reload this page.
This code could replace adding a custom mu-plugin when handling
postTypes
:The text was updated successfully, but these errors were encountered: