• Resolved Aridani

    (@aridaniv)


    I use piklist on wordpress 5.1

    Try to create a slider widget with the file type, but it can’t be saved.

    Is piklist not compatible with the latest wordpress?

    Need help.

    Slider-form.php

    piklist('field', array(
        'type' => 'text',
        'field' => 'my_text',
        'label' => 'Text',
        'attributes' => array(
          'class' => 'regular-text'
        )
      ));
    piklist( 'field', array(
      'type'    => 'group',
      'field'   => 'slider_group',
      'add_more'  => true,
      'label'   => __('Slider Expert4you', 'expert4you'),
      'fields'  => array(
        array(
          'type'  => 'file',
          'field' => 'slider_image',
          'label' => __('Slides', 'expert4you'),
          'columns' => 12,
        )
      )
    ) );

    Slider.php

    <?php
    /*  
    Title:  Slider Widget
    Description:  Slider Widget
    Standalone: true
    */?>
    <?php echo $before_widget; ?>
    
    <?php echo $before_title; ?>
    
    <?php echo $settings['my_text']; ?>
    
    <?php echo $after_title; ?>
    
    <?php echo $settings['slider_group']; ?>
    
    <?php echo $after_widget; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘File can’t save or upload’ is closed to new replies.