Title: Remove Nested DIV markup
Last modified: August 20, 2016

---

# Remove Nested DIV markup

 *  [WeePixel](https://wordpress.org/support/users/weepixel/)
 * (@weepixel)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/remove-nested-div-markup/)
 * Hi,
 * I was wondering if it would be possible to remove the nested div structure when
   echo’ing a field?
 * When I use this call ….
 * `<?php echo(types_render_field("sidebar-image", array("size"=>"side-thumb", "
   class"=>"side-thumb"))); ?>`
 * This structure is produced in HTML ….
 *     ```
       <div id="wpcf-field-sidebar-image" class="wpcf-field-image wpcf-field-sidebar-image">
       	<div class="wpcf-field-value wpcf-field-image-value wpcf-field-sidebar-image-value">
       		<img width="336" height="229" src="wp-content/uploads/2013/03/myimage.png" class="attachment-side-thumb side-thumb" alt="" style="" title="" />
       	</div>
       </div>
       ```
   
 * This seems like a lot of markup to display a single image. Any help appreciated,
   thanks
 * [http://wordpress.org/extend/plugins/types/](http://wordpress.org/extend/plugins/types/)

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

 *  [Bigul Malayi](https://wordpress.org/support/users/mbigul/)
 * (@mbigul)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/remove-nested-div-markup/#post-3618711)
 * Hi WeePixel,
 * Please check this tutorial for more details [http://wp-types.com/documentation/functions/#Image](http://wp-types.com/documentation/functions/#Image).
 * _[ [Signature moderated](http://codex.wordpress.org/Forum_Welcome#Signatures).]_
 *  Thread Starter [WeePixel](https://wordpress.org/support/users/weepixel/)
 * (@weepixel)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/remove-nested-div-markup/#post-3618739)
 * Hi Bigul,
    Thanks for the link and reply. However I am still having an issue.
 * When i use this call
 * `<?php echo(types_render_field("sidebar-image", array("size"=>"side-thumb")));?
   >`
 * I can get the IMG tag output without the div markup. When I try to add a class
   using this call …
 * `<?php echo(types_render_field("sidebar-image", array("size"=>"side-thumb", "
   class"=>"side-thumb"))); ?>`
 * the IMG tag is output with the additional DIV markup ( below ).. is this a bug
   or am I missing something – I am using Types – Complete Solution for Custom Fields
   and Types – Version 1.1.3.4
 *     ```
       <div id="wpcf-field-sidebar-image-2" class="wpcf-field-image wpcf-field-sidebar-image">
       	<div class="wpcf-field-value wpcf-field-image-value wpcf-field-sidebar-image-value">
       		<img width="336" height="229" src="wp-content/uploads/2013/03/myimage.png" class="attachment-side-thumb side-thumb" alt="" style="" title="" />
       	</div>
       </div>
       ```
   
 * Again any help appreciated, thanks
 *  [Bigul Malayi](https://wordpress.org/support/users/mbigul/)
 * (@mbigul)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/remove-nested-div-markup/#post-3618845)
 * Hi WeePixel,
 * Size parameter value must be one of these ‘thumbnail’,’medium’,’large’ or ‘full’.
   Please check tutorial for more details [http://wp-types.com/documentation/functions/#Image](http://wp-types.com/documentation/functions/#Image)
 * Please let me know what will be result of following code. If issue exist please
   upgrade to Latest version Types 1.2.1.2(After taking a backup)and try.
 * `<?php echo(types_render_field("sidebar-image", array("class"=>"side-thumb")));?
   >`
 * Hope your WordPress version is 3.5.1.
 * _[ [Signature moderated](http://codex.wordpress.org/Forum_Welcome#Signatures).]_

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

The topic ‘Remove Nested DIV markup’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/types_ced1d3.svg)
 * [Toolset Types - Custom Post Types, Custom Fields and Taxonomies](https://wordpress.org/plugins/types/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/types/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/types/)
 * [Active Topics](https://wordpress.org/support/plugin/types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/types/reviews/)

## Tags

 * [wp-types](https://wordpress.org/support/topic-tag/wp-types/)

 * 3 replies
 * 2 participants
 * Last reply from: [Bigul Malayi](https://wordpress.org/support/users/mbigul/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/remove-nested-div-markup/#post-3618845)
 * Status: not resolved