Upload control in repeater, can’t upload pdf
-
I have a kirki repeater control container a few controls, one of which is the ‘Upload’ control.
However, when I use it to try to upload a pdf it doesn’t work properly. It appears to upload the pdf, but it doesn’t show in the media screen. I can still ‘Select’ it from the upload as it appears in the right hand column, but when I then save the customizer and refresh it doesn’t save it.
A normal Upload control works fine, but in a repeater it doesn’t.I found someone had a similar issue here:
https://bleepcoder.com/kirki/351101763/upload-control-in-repeaterBut there is not a solution on that thread.
I’m wondering if this is a known bug or if I am doing something wrong with my implementation?
Thanks in advance!My code is as follows:
Kirki::add_field( 'kirki_repeater', array( 'type' => 'repeater', 'label' => esc_attr__( 'Links:', 'kirki' ), 'description' => esc_attr__( 'repeater test' ), 'help' => esc_attr__( 'This is a tooltip', 'kirki-repeater' ), 'section' => 'test-repeater', 'priority' => 1, 'settings' => 'repeater_test', 'default' => '', 'fields' => array( 'pdfupload' => array( 'type' => 'upload', 'default' => '', 'label' => 'upload pdf', ), ), ) );
- The topic ‘Upload control in repeater, can’t upload pdf’ is closed to new replies.