Custom Fields
Re-Envisioned
Support Meta Box Builder Alphabetize checkbox_list field type

  • Creator
    Topic
  • #32898
    Resolved mschraeder
    Participant

    I have a custom post type, "Technical Documents", and have all these posts listed using a checkbox_list field type for the user to select which posts to display. However, there are 100+ posts and it would be easier to use if they were in alphabetical order. Is there a way to do this?

    Thank you!

    My code:

    $meta_boxes[] = [
            'title'   => esc_html__( 'Technical PDFs to Display', 'online-generator' ),
            'id'      => 'selectpdf',
        'post_types' => ['product'],
            'context' => 'normal',
    'fields'  => [
        [
            'type'       => 'post',
            'name'       => esc_html__( 'Select Product PDFs', 'online-generator' ),
            'desc'       => 'online-generator',
            'id'         => $prefix . 'product_pdfs',
            'post_type'  => 'technicaldocuments',
            'field_type' => 'checkbox_list'
        ],
    ],
    ];
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.