admin – How to edit multiple custom post types at one place in administration?

Question

I have my own custom post (Vozidlo) which contains multiple options for editing, which are then shown in one bigger table, but when I wanna edit all those options I have to open each post and edit it there.

How can I create one simple page in administration where I could have the result editable table?

Page meta for custom post

$meta_boxes[] = array(
    'id'         => 'autocenik_metabox',
    'title'      => 'Ceník',
    'pages'      => array( 'vozidlo'), // Post type
    'context'    => 'normal',
    'priority'   => 'high',
    'show_names' => true, // Show field names on the left
    'fields'     => array(
        array(
            'name' => 'Vratná jistina',
            'desc' => 'Kč',
            'id'   => $prefix . 'vratna_jistina',
    //'std'  => ,
            'type' => 'text_small',
        ),
        array(
            'name' => 'Vratná jistina zima',
            'desc' => 'Kč',
            'id'   => $prefix . 'vratna_jistina_zima',
    //'std'  => ,
            'type' => 'text_small',
        ),
  array(
            'name' => 'od 3 dnů',
            'desc' => 'Kč/den',
            'id'   => $prefix . 'cena_od3dnu',
    //'std'  => ,
            'type' => 'text_small',
        ),
  array(
            'name' => 'od 3 dnů zima',
            'desc' => 'Kč/den',
            'id'   => $prefix . 'cena_od3dnu_zima',
    //'std'  => ,
            'type' => 'text_small',
        ),
/*
  array(
            'name' => '7 dnů',
            'desc' => 'Kč/den',
            'id'   => $prefix . 'cena_7dnu',
    //'std'  => ,
            'type' => 'text_small',
        ),
*/
  array(
            'name' => '10 dnů',
            'desc' => 'Kč/den',
            'id'   => $prefix . 'cena_10dnu',
    //'std'  => ,
            'type' => 'text_small',
        ),
  array(
            'name' => '10 dnů zima',
            'desc' => 'Kč/den',
            'id'   => $prefix . 'cena_10dnu_zima',
    //'std'  => ,
            'type' => 'text_small',
        ),
  /*array(
            'name' => '14 dnů',
            'desc' => 'Kč/den',
            'id'   => $prefix . 'cena_14dnu',
    //'std'  => ,
            'type' => 'text_small',
        ),
  */
  array(
            'name' => '21 dnů',
            'desc' => 'Kč/den',
            'id'   => $prefix . 'cena_21dnu',
    //'std'  => ,
            'type' => 'text_small',
        ),
  array(
            'name' => '21 dnů zima',
            'desc' => 'Kč/den',
            'id'   => $prefix . 'cena_21dnu_zima',
    //'std'  => ,
            'type' => 'text_small',
        ),
  array(
            'name' => '1 měsíc',
            'desc' => 'Kč/měsíc',
            'id'   => $prefix . 'cena_1mes',
    //'std'  => ,
            'type' => 'text_small',
        ),
  array(
            'name' => '1 měsíc zima',
            'desc' => 'Kč/měsíc',
            'id'   => $prefix . 'cena_1mes_zima',
    //'std'  => ,
            'type' => 'text_small',
        ),
  array(
            'name' => 'Cena za víkend (od Pá 15.00 hod. - do Po 8.00 hod.)',
            'desc' => 'Kč',
            'id'   => $prefix . 'cena_vikend',
    //'std'  => ,
            'type' => 'text_small',
        ),
    
  array(
            'name' => 'Cena za víkend (od Pá 15.00 hod. - do Po 8.00 hod.) zima',
            'desc' => 'Kč',
            'id'   => $prefix . 'cena_vikend_zima',
    //'std'  => ,
            'type' => 'text_small',
        )
    ),
);

Edit of one page
enter image description here

0
Martin Jinda 1 year 2022-06-15T05:33:05-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse