Title: Creating custom widget with parameter &#8211; what is wrong with code
Last modified: August 21, 2016

---

# Creating custom widget with parameter – what is wrong with code

 *  [m1000](https://wordpress.org/support/users/m1000/)
 * (@m1000)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/creating-custom-widget-with-parameter-what-is-wrong-with-code/)
 * Hi,
 * I want to create custom widget where I can control number of comments. In this
   code – [http://pastebin.com/etkpKza1](http://pastebin.com/etkpKza1)
 * echo $number_of_comments;
 * is just empty. What I did wrong? $title is working fine.

The topic ‘Creating custom widget with parameter – what is wrong with code’ is closed
to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [m1000](https://wordpress.org/support/users/m1000/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/creating-custom-widget-with-parameter-what-is-wrong-with-code/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
