Hi lads, I would like to ask you for the possibility of subtitles in SO Image widget.
Meanwhile and if someone is interested in it, I wrote solution by modifying:
wp-contentpluginsso-widgets-bundlewidgetsimageimage.php
by adding this code in the image array:
Warning: SiteOrigin do not recommend making direct edits to plugins. Any and all changes will be lost on update
/****BY SGC****/ 'subtitle' => array( 'type' => 'text', 'label' => __('Subtitle text', 'so-widgets-bundle'), ), 'subtitle_position' => array( 'type' => 'select', 'label' => __('Subtitle position', 'so-widgets-bundle'), 'default' => 'hidden', 'options' => array( 'hidden' => __( 'Hidden', 'so-widgets-bundle' ), 'above' => __( 'Above', 'so-widgets-bundle' ), 'below' => __( 'Below', 'so-widgets-bundle' ), ), ), /******************/ AND wp-contentpluginsso-widgets-bundlewidgetsimagetplbase.php TO LOOK: <a href="" > $src[0], ); if(!empty($src[1])) $attr['width'] = $src[1]; if(!empty($src[2])) $attr['height'] = $src[2]; if (function_exists('wp_get_attachment_image_srcset')) { $attr['srcset'] = wp_get_attachment_image_srcset($image, $size); } } $classes = array('so-widget-image'); if(!empty($title)) $attr['title'] = $title; /**** By SGC *****/ if(!empty($subtitle)) $attr['subtitle'] = $subtitle; /****************/ if(!empty($alt)) $attr['alt'] = $alt; ?> <a href="" > <img $v) echo $n.'="' . esc_attr($v) . '" ' ?> class=""/> <!--**** By SGC *****/--> <a href="" >
Hi Sergi,
This is a good suggestion and I’ll log it. To be honest, we won’t be able to work on this for a while due to higher priorities so I would strongly suggest submitting a pull request to our GitHub repo.
That's perfect man, will do for sure, as you can check it only needs few lines to be added!