This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Image Subtitles

9 years ago · Last reply by Sergi Gambin 9 years ago

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="" >

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. Alex S Staff 9 years, 9 months ago

    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.

  2. Sergi Gambin 9 years, 9 months ago

    That's perfect man, will do for sure, as you can check it only needs few lines to be added!

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread