Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andrewmclagan/attached-post-field-cmb2

Single post to post relation field for CMB2 (Wordpress Plugin)
https://github.com/andrewmclagan/attached-post-field-cmb2

Last synced: 23 days ago
JSON representation

Single post to post relation field for CMB2 (Wordpress Plugin)

Awesome Lists containing this project

README

        

Attached Posts Field CMB2
==================

Custom field for [CMB2](https://github.com/WebDevStudios/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,
],
````