- This topic has 1 reply, 2 voices, and was last updated 5 years, 5 months ago by
Steve.
Viewing 1 reply thread
-
AuthorPosts
-
-
August 31, 2016 at 5:54 pm #7288
Dante CervantesMemberHello guys, i’m having a strange issue, when i want to save a widget, it reset all my fields and is not saving nothing!
here is my code and a gift showing error
promotions-form.php
<?php piklist('field', array( 'type' => 'group' ,'field' => 'lt_box_promotions' ,'add_more' => true ,'fields' => array( array( 'type' => 'file' ,'field' => 'lt_box_image' ,'columns' => 12 ,'label' => __('Agregar imagen','piklist') ,'description' => __('Seleccione la imagen que desea mostrar en la promoción','piklist') ,'options' => array( 'basic' => false ,'multiple' => false ) ) ,array( 'type' => 'text' ,'field' => 'lt_box_link' ,'columns' => 12 ,'attributes' => array( 'placeholder' => 'Enlace (link)' ) ) ,array( 'type' => 'radio' ,'field' => 'tc_box_open' ,'columns' => 12 ,'label' => __('¿Abre en otra pestaña?','piklist') ,'choices' => array( 0 => 'No', 1 => 'Si' ) ) ) ));promotions.php
<?php /* Title: Hot Topix: Promotions Description: Widget para añadir promociones */ ?> <?php echo $before_widget; ?> <ul class="bxslider"> <?php foreach($settings['lt_box_promotions'] as $slide){ ?> <?php $image = wp_get_attachment_image_src( $slide['lt_box_image'][0], 'medium', //size full,medium,thumbnail false //icon ); ?> <li> <?php if($slide['lt_box_link'] != ""){ //verificar si abre en otra pestaña $openInBlankPage = $slide['tc_box_open'][0]; ?> <a href="<?= $slide['lt_box_link'] ?>" <?php if($openInBlankPage == 1){ echo 'target="_blank"'; } ?> > <img src="<?= $image[0] ?>" /> </a> <?php }else{?> <img src="<?= $image[0] ?>" /> <?php }?> </li> <?php } ?> </ul> <?php echo $after_widget; ?>Attachments:
You must be logged in to view attached files. -
September 4, 2016 at 12:23 pm #7306
SteveKeymasterTry removing the field ‘lt_box_promotions’
-
-
AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.