Skip to content

Instantly share code, notes, and snippets.

@tomfinitely
Last active November 8, 2016 19:42
Show Gist options
  • Save tomfinitely/caa387aed92caa821e914c9f7c364501 to your computer and use it in GitHub Desktop.
Save tomfinitely/caa387aed92caa821e914c9f7c364501 to your computer and use it in GitHub Desktop.
ACF Flexible Single Page Builder
/*---------------------------------------------------*/
/* Flexible Single Pages */
/*---------------------------------------------------*/
if( function_exists('acf_add_local_field_group') ):
acf_add_local_field_group(array (
'key' => 'group_550f4c3fb623b',
'title' => 'Flexible Content',
'fields' => array (
array (
'key' => 'field_550f4c4b9591a',
'label' => 'Terminal Page Flexible Content',
'name' => 'terminal_page_flexible_content',
'type' => 'flexible_content',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'button_label' => 'Add Row',
'min' => '',
'max' => '',
'layouts' => array (
array (
'key' => '550f65d49764d',
'name' => 'image_-_text',
'label' => 'Image - Text',
'display' => 'block',
'sub_fields' => array (
array (
'key' => 'field_57f301be2b557',
'label' => 'Headline',
'name' => 'headline_image_text',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
'readonly' => 0,
'disabled' => 0,
),
array (
'key' => 'field_550f66139764e',
'label' => 'Left Image',
'name' => 'left_image',
'type' => 'image',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => 50,
'class' => '',
'id' => '',
),
'return_format' => 'array',
'preview_size' => 'large',
'library' => 'all',
'min_width' => '',
'min_height' => '',
'min_size' => '',
'max_width' => '',
'max_height' => '',
'max_size' => '',
'mime_types' => '',
),
array (
'key' => 'field_550f663b9764f',
'label' => 'Right Text',
'name' => 'right_text',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => 50,
'class' => '',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_550f720cb8cb7',
'label' => 'CSS Class',
'name' => 'css_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
'readonly' => 0,
'disabled' => 0,
),
array (
'key' => 'field_581a430cf9a33',
'label' => 'Background Image',
'name' => 'background_image',
'type' => 'image',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'return_format' => 'url',
'preview_size' => 'featured-medium',
'library' => 'all',
'min_width' => '',
'min_height' => '',
'min_size' => '',
'max_width' => '',
'max_height' => '',
'max_size' => '',
'mime_types' => '.jpg, .png, .gif',
),
),
'min' => '',
'max' => '',
),
array (
'key' => '550f6f8a5a82b',
'name' => 'text_-_image',
'label' => 'Text - Image',
'display' => 'block',
'sub_fields' => array (
array (
'key' => 'field_57f301d92b558',
'label' => 'Headline',
'name' => 'headline_text_image',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_550f6f8a5a82d',
'label' => 'Left Text',
'name' => 'left_text',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '50',
'class' => '',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_550f6f8a5a82c',
'label' => 'Right Image',
'name' => 'right_image',
'type' => 'image',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '50',
'class' => '',
'id' => '',
),
'return_format' => 'array',
'preview_size' => 'large',
'library' => 'all',
'min_width' => '',
'min_height' => '',
'min_size' => '',
'max_width' => '',
'max_height' => '',
'max_size' => '',
'mime_types' => '',
),
array (
'key' => 'field_550f72dae3498',
'label' => 'CSS Class',
'name' => 'css_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581a4348f9a34',
'label' => 'Background Image',
'name' => 'background_image',
'type' => 'image',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'return_format' => 'url',
'preview_size' => 'featured-medium',
'library' => 'all',
'min_width' => '',
'min_height' => '',
'min_size' => '',
'max_width' => '',
'max_height' => '',
'max_size' => '',
'mime_types' => '.jpg, .png, .gif',
),
),
'min' => '',
'max' => '',
),
array (
'key' => '581a52d6a5e00',
'name' => 'one-column-flex',
'label' => 'One-Column',
'display' => 'block',
'sub_fields' => array (
array (
'key' => 'field_581a52d6a5e01',
'label' => 'Headline',
'name' => 'headline_1_col_1',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581a52d6a5e02',
'label' => 'Single Column',
'name' => '1_col_column_1',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_581a52d6a5e03',
'label' => 'CSS Class',
'name' => 'css_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581a52d6a5e04',
'label' => 'Background Image',
'name' => 'background_image',
'type' => 'image',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'return_format' => 'url',
'preview_size' => 'featured-medium',
'library' => 'all',
'min_width' => '',
'min_height' => '',
'min_size' => '',
'max_width' => '',
'max_height' => '',
'max_size' => '',
'mime_types' => '.jpg, .png, .gif',
),
array (
'key' => 'field_581a52d6a5e05',
'label' => 'Display CTA Button',
'name' => 'display_cta_button',
'type' => 'true_false',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '20',
'class' => '',
'id' => '',
),
'message' => 'Show Call to Action?',
'default_value' => 0,
),
array (
'key' => 'field_581a52d6a5e06',
'label' => 'Hero CTA Button URL',
'name' => 'hero_cta_button_url',
'type' => 'url',
'instructions' => '',
'required' => 0,
'conditional_logic' => array (
array (
array (
'field' => 'field_581a52d6a5e05',
'operator' => '==',
'value' => '1',
),
),
),
'wrapper' => array (
'width' => '40',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
),
array (
'key' => 'field_581a52d6a5e07',
'label' => 'Hero CTA Button Text',
'name' => 'hero_cta_button_text',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => array (
array (
array (
'field' => 'field_581a52d6a5e05',
'operator' => '==',
'value' => '1',
),
),
),
'wrapper' => array (
'width' => '40',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'min' => '',
'max' => '',
),
array (
'key' => '58125a6afff8a',
'name' => 'two-column-flex',
'label' => 'Two-Column',
'display' => 'block',
'sub_fields' => array (
array (
'key' => 'field_581a43fff9a3c',
'label' => 'Column 1 Headline',
'name' => '2_col_column_1_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '50',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581a441cf9a3d',
'label' => 'Column 2 Headline',
'name' => '2_col_column_2_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '50',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_58125a90fff8b',
'label' => 'Column 1 Text',
'name' => '2_col_column_1',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '50',
'class' => 'one-half first',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_58125abafff8c',
'label' => 'Column 2 Text',
'name' => '2_col_column_2',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '50',
'class' => 'one-half',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_581a4389f9a37',
'label' => 'CSS Class',
'name' => 'css_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'min' => '',
'max' => '',
),
array (
'key' => '581ba2580363c',
'name' => 'two-column-two-thirds-left-flex',
'label' => 'Two-Column, 2/3 Left',
'display' => 'block',
'sub_fields' => array (
array (
'key' => 'field_581ba2580363d',
'label' => 'Column 1 Headline',
'name' => '2_col_column_1_headline',
'type' => 'text',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '66',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581ba2580363e',
'label' => 'Column 2 Headline',
'name' => '2_col_column_2_headline',
'type' => 'text',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581ba2580363f',
'label' => 'Column 1 Text',
'name' => '2_col_column_1',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '66',
'class' => 'one-half first',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_581ba25803640',
'label' => 'Column 2 Text',
'name' => '2_col_column_2',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => 'one-half',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_581ba25803641',
'label' => 'CSS Class',
'name' => 'css_class',
'type' => 'text',
'instructions' => '',
'required' => '',
'conditional_logic' => '',
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'min' => '',
'max' => '',
),
array (
'key' => '581ba27903643',
'name' => 'two-column-two-thirds-right-flex',
'label' => 'Two-Column, 2/3 Right',
'display' => 'block',
'sub_fields' => array (
array (
'key' => 'field_581ba27903644',
'label' => 'Column 1 Headline',
'name' => '2_col_column_1_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581ba27903645',
'label' => 'Column 2 Headline',
'name' => '2_col_column_2_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '66',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581ba27903646',
'label' => 'Column 1 Text',
'name' => '2_col_column_1',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => 'one-half first',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_581ba27903647',
'label' => 'Column 2 Text',
'name' => '2_col_column_2',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '66',
'class' => 'one-half',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_581ba27903648',
'label' => 'CSS Class',
'name' => 'css_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'min' => '',
'max' => '',
),
array (
'key' => '58125e2899fa2',
'name' => 'three-column-flex',
'label' => 'Three-Column',
'display' => 'block',
'sub_fields' => array (
array (
'key' => 'field_581a4a5817bf5',
'label' => 'Column 1 Headline',
'name' => '3_col_column_1_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581a4a7c17bf6',
'label' => 'Column 2 Headline',
'name' => '3_col_column_2_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581a4a8017bf7',
'label' => 'Column 3 Headline',
'name' => '3_col_column_3_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_58125e3499fa3',
'label' => 'Column 1 Text',
'name' => '3_col_column_1',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => 'one-third first',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_58125eae99fa4',
'label' => 'Column 2 Text',
'name' => '3_col_column_2',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => 'one-third',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_58125ebe99fa5',
'label' => 'Column 3 Text',
'name' => '3_col_column_3',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '33',
'class' => 'one-third',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_581a43a1f9a39',
'label' => 'CSS Class',
'name' => 'css_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'min' => '',
'max' => '',
),
array (
'key' => '58125f426357a',
'name' => 'four-column-flex',
'label' => 'Four-Column',
'display' => 'block',
'sub_fields' => array (
array (
'key' => 'field_581a4ab617bf8',
'label' => 'Column 1 Headline',
'name' => '4_col_column_1_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '25',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581a4abf17bf9',
'label' => 'Column 2 Headline',
'name' => '4_col_column_2_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '25',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581a4ac517bfa',
'label' => 'Column 3 Headline',
'name' => '4_col_column_3_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '25',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_581a4aee17bfb',
'label' => 'Column 4 Headline',
'name' => '4_col_column_4_headline',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '25',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array (
'key' => 'field_58125f426357b',
'label' => 'Column 1 Text',
'name' => '4_col_column_1',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '25',
'class' => 'one-fourth first',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_58125f426357c',
'label' => 'Column 2 Text',
'name' => '4_col_column_2',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '25',
'class' => 'one-fourth',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_58125f426357d',
'label' => 'Column 3 Text',
'name' => '4_col_column_3',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '25',
'class' => 'one-fourth',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_58125f576357e',
'label' => 'Column 4 Text',
'name' => '4_col_column_4',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '25',
'class' => 'one-fourth',
'id' => '',
),
'default_value' => '',
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
),
array (
'key' => 'field_581a43b0f9a3a',
'label' => 'CSS Class',
'name' => 'css_class',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'min' => '',
'max' => '',
),
),
),
),
'location' => array (
array (
array (
'param' => 'page_template',
'operator' => '==',
'value' => 'page_flexible.php',
),
),
),
'menu_order' => 0,
'position' => 'normal',
'style' => 'default',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
'active' => 1,
'description' => '',
));
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment