Title: [Plugin: Custom Field Template] Caption in Sidebar shows HTML Code
Last modified: August 20, 2016

---

# [Plugin: Custom Field Template] Caption in Sidebar shows HTML Code

 *  [kevin1889](https://wordpress.org/support/users/kevin1889/)
 * (@kevin1889)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-caption-in-sidebar-shows-html-code/)
 * I’m using the Custom Field Template plugin to pull in several images to my post.
   Within the post the image thumbnail and caption display just fine. I’m also trying
   to dynamically pull the images in the sidebar, but when I use the code below 
   to call the image, the HTML Code is displaying in the caption box. This is what
   I see in the sidebar:
 * [caption id="attachment_146" align="alignleft" width="150" caption="
    Text displayed
   in the Caption "]**THE IMAGE DISPLAYS HERE**[/caption]
 * Here’s the actual code that calls the image:
 *     ```
       <div id="secondary" class="widget-area" role="complementary">
       	<div id="attachment" class="wp-caption alignleft" style="width: 140px">
       	<?php
       		global $wp_query;
       		$postid = $wp_query->post->ID;
       		echo get_post_meta($postid, 'Image_1', true);
       		wp_reset_query();
       	?>
       	</div>
   
       </div>
       ```
   
 * What I would like to do is use the image and caption but get rid of the HTML 
   code that displays, OR use just the image itself without the caption or the thumbnail
   box.
 * I’ve tried to use the information in the following posts but have not been successful(
   they don’t allow me to set the width at 140px):
    [Link 1](http://wordpress.org/support/topic/plugin-custom-field-template-wordpress-does-not-process-custom-text-field)
   [Link 2](http://wordpress.org/support/topic/plugin-custom-field-template-wp-captions-not-working-with-cft)
 * I’m very new to WordPress and trying to learn a lot of this as I go. Thanks in
   advance for your help.

The topic ‘[Plugin: Custom Field Template] Caption in Sidebar shows HTML Code’ is
closed to new replies.

## Tags

 * [caption](https://wordpress.org/support/topic-tag/caption/)
 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)

 * 0 replies
 * 1 participant
 * Last reply from: [kevin1889](https://wordpress.org/support/users/kevin1889/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-caption-in-sidebar-shows-html-code/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
