andrew / attached-post-field-cmb2
Post to post relation field for CMB2
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:wordpress-plugin
Requires
- php: >7.0.0
Suggests
- composer/installers: ~1.0
This package is auto-updated.
Last update: 2024-10-29 04:20:04 UTC
README
Custom field for CMB2.
Create a dropdown feild listing a post type for creating a post-to-post style relationship. Saves the post ID into a custom meta field.
Example:
'ticket_id' => [
'id' => 'ticket_id',
'label' => 'Ticket Type',
'description' => '',
'class' => [''],
'input_class' => ['attendee-ticket_id'],
'placeholder' => 'Select your ticket',
'type' => 'post_type',
'options' => [
'post_type' => 'product',
'query' => [
''
],
],
'required' => true,
],