Title: [Plugin: Image Widget] Move title under image
Last modified: August 20, 2016

---

# [Plugin: Image Widget] Move title under image

 *  Resolved [Barblee72](https://wordpress.org/support/users/barblee72/)
 * (@barblee72)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-image-widget-move-title-under-image/)
 * I’m trying to work out how to move the title of the image widget so that appears
   under the image and above the description. Not sure if this is something that
   I change in the plugin files or my theme files. Can anyone tell me how to do 
   this? Thanks in advance.
    B
 * [http://wordpress.org/extend/plugins/image-widget/](http://wordpress.org/extend/plugins/image-widget/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [chrisbratt](https://wordpress.org/support/users/chrisbratt/)
 * (@chrisbratt)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-image-widget-move-title-under-image/#post-2618475)
 * Don’t know if someone has already sorted this out for you, but you need to edit
   the image-widget.php file.
 * Plugins > Editor > Image Widget > image-widget.php
 * Then copy this code:
 *     ```
       <?php
       /**
        * Widget template. This template can be overriden using the "sp_template_image-widget_widget.php" filter.
        * See the readme.txt file for more info.
        */
   
       // Block direct requests
       if ( !defined('ABSPATH') )
       	die('-1');
   
       echo $before_widget;
       if ( !empty( $image ) ) {
       	if ( $link ) {
       		echo '<a class="'.$this->widget_options['classname'].'-image-link" href="'.esc_url($link).'" target="'.esc_attr($linktarget).'">';
       	}
       	if ( $imageurl ) {
       		echo '<img src="'.esc_url($imageurl).'" style="';
       		if ( !empty( $width ) && is_numeric( $width ) ) {
       			echo "max-width: {$width}px;";
       		}
       		if ( !empty( $height ) && is_numeric( $height ) ) {
       			echo "max-height: {$height}px;";
       		}
       		echo "\"";
       		if ( !empty( $align ) && $align != 'none' ) {
       			$align = esc_attr($align);
       			echo " class=\"align{$align}\"";
       		}
       		if ( !empty( $alt ) ) {
       			$alt = esc_attr($alt);
       			echo " alt=\"{$alt}\"";
       		} else {
       			$title = esc_attr($title);
       			echo " alt=\"{$title}\"";
       		}
       		echo " />";
       	}
   
       	if ( $link ) { echo '</a>'; }
       }
       if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
       if ( !empty( $description ) ) {
       	$text = apply_filters( 'widget_text', $description, $args, $instance );
       	echo '<div class="'.$this->widget_options['classname'].'-description" >';
       	echo wpautop( $text );
       	echo "</div>";
       }
       echo $after_widget;
       ?>
       ```
   
 *  [Peter Chester](https://wordpress.org/support/users/peterchester/)
 * (@peterchester)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-image-widget-move-title-under-image/#post-2618476)
 * Actually, you really should NOT edit the file. Instead you should create a copy
   of it and edit it. Otherwise you’ll lose your changes whenever you update the
   plugin.
 * See “Default vs. Custom Templates”: [http://wordpress.org/extend/plugins/image-widget/other_notes/](http://wordpress.org/extend/plugins/image-widget/other_notes/)
 *  [chrisbratt](https://wordpress.org/support/users/chrisbratt/)
 * (@chrisbratt)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-image-widget-move-title-under-image/#post-2618477)
 * Fair point Peter – thanks. Make a copy of that file and then use the code above
   in your copy version.
 * Apologies.
 * [@chrisbratt](https://wordpress.org/support/users/chrisbratt/)
 *  [Peter Chester](https://wordpress.org/support/users/peterchester/)
 * (@peterchester)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-image-widget-move-title-under-image/#post-2618478)
 * Thanks for replying proactively [@chrisbratt](https://wordpress.org/support/users/chrisbratt/).
   Sorry if I sounded grumpy. I haven’t had my coffee yet. I appreciate it greatly
   when people help each other out. Thank you!
 * -p
 *  [chrisbratt](https://wordpress.org/support/users/chrisbratt/)
 * (@chrisbratt)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-image-widget-move-title-under-image/#post-2618479)
 * No that’s okay, Peter — nothing worse than learning incorrect information. I’m
   relatively new to WordPress myself and it’s definitely worth ensuring good practice
   is followed.
 * Cheers,
    [@chrisbratt](https://wordpress.org/support/users/chrisbratt/)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: Image Widget] Move title under image’ is closed to new replies.

 * ![](https://ps.w.org/image-widget/assets/icon-256x256.png?rev=2489603)
 * [Image Widget](https://wordpress.org/plugins/image-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/image-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-widget/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [chrisbratt](https://wordpress.org/support/users/chrisbratt/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-image-widget-move-title-under-image/#post-2618479)
 * Status: resolved