Title: Widget error
Last modified: August 30, 2016

---

# Widget error

 *  [Puneetgamer](https://wordpress.org/support/users/puneetgamer/)
 * (@puneetgamer)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/widget-error-21/)
 * My widget is giving error – when i click appearance then widgets – instead of
   displaying menu its displaying codes
 * _[ Moderator note: code fixed. Please wrap code in the backtick character or 
   [use the code button](http://codex.wordpress.org/Forum_Welcome#Posting_Code).]_
 *     ```
       label class="setting size">
       								<span>Size</span>
       								<select class="size" name="size"
       									data-setting="size"
       									<# if ( data.userSettings ) { #>
       										data-user-setting="imgsize"
       									<# } #>>
       																			<#
       										var size = data.sizes['thumbnail'];
       										if ( size ) { #>
       											<option value="thumbnail">
       												Thumbnail – {{ size.width }} × {{ size.height }}
       											</option>
       										<# } #>
       																			<#
       										var size = data.sizes['medium'];
       										if ( size ) { #>
       											<option value="medium">
       												Medium – {{ size.width }} × {{ size.height }}
       											</option>
       										<# } #>
       																			<#
       										var size = data.sizes['large'];
       										if ( size ) { #>
       											<option value="large">
       												Large – {{ size.width }} × {{ size.height }}
       											</option>
       										<# } #>
       																			<#
       										var size = data.sizes['full'];
       										if ( size ) { #>
       											<option value="full">
       												Full Size – {{ size.width }} × {{ size.height }}
   
       .
       .
       .
       .
       . 
   
       -----> like this
       ```
   

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

 *  [Vaughan](https://wordpress.org/support/users/m0nty/)
 * (@m0nty)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/widget-error-21/#post-6276366)
 * Hi,
 * This sounds like it could be an issue with the theme or a plugin.
 * When you say a widget is causing the issue. How have you actually registered 
   the widget itself?
 * Are you using a plugin to register the widget? or have you registered the widget
   by adding code to your theme functions.php?
 * If the latter, could you copy/paste the actual code you used to register/create
   the widget in your theme functions.php
 * Thanks
 *  Thread Starter [Puneetgamer](https://wordpress.org/support/users/puneetgamer/)
 * (@puneetgamer)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/widget-error-21/#post-6276473)
 * Hello
 * Its not a theme issue might be a plugin issue. And i’m nt getting what you are
   saying. I’m a beginner to wordpress n i’m using custom side bar plugin n when
   i click appearance > widgets – menu is not displayed istead the above codes or
   script is display.
 * Regards
    Puneet

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

The topic ‘Widget error’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Puneetgamer](https://wordpress.org/support/users/puneetgamer/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/widget-error-21/#post-6276473)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
