Title: problem with widgets
Last modified: August 18, 2016

---

# problem with widgets

 *  Resolved [Janzomaster](https://wordpress.org/support/users/janzomaster/)
 * (@janzomaster)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/problem-with-widgets/)
 * Hi, I recently updated to 2.2 and want to use the widget feature. But I still
   got a few problems, which I cant work out.
 * My search box in the sidebar is not recognized correctly by the widget-thingy.
 * The code in the sidebar.php is:
 *     ```
       <li id="search">
       <h2><label for="s"><?php _e('Search:'); ?></label></h2>
       <ul>
       <li>
       <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
       <div style="text-align:center">
       <input type="text" name="s" id="s" size="15" />
       <input type="submit" name="submit" value="<?php _e('Search'); ?>" />
       </div>
       </form>
       </li>
       </ul>
       </li>
       ```
   
 * But is displayed as
 *     ```
       <li id="search" class="widget widget_search">
       <form id="searchform" method="get" action="http://www.moeboll.de">
       <div>
       <input name="s" id="s" size="15" type="text"><br>
       <input value="Suchen" type="submit">
       </div>
       </form>
       </li>
       ```
   
 * Why does the widget tool ignore the first li and the following to lines of code,
   and their close-tags at the end respectevly? Why is the form code changed as 
   well?

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/problem-with-widgets/#post-580366)
 * You’ll want to review how to widgetize a theme at [http://automattic.com/code/widgets/themes/](http://automattic.com/code/widgets/themes/).
 * Also use the WordPress Default 1.6 theme in 2.2 for examples.
 *  Thread Starter [Janzomaster](https://wordpress.org/support/users/janzomaster/)
 * (@janzomaster)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/problem-with-widgets/#post-580368)
 * I know the page, I tried to solve the problem with the info from it, but well,
   didnt work. Ok, I’m not that good with code, but isnt the search-box code exactly
   the way the widget tool wants it?
    It’s got a li with id=”search” – what more
   is needed to be properly recognized? The rest of the sidebar is tagged the same
   way, and works fine. Is there anything in the code that messes the whole thing
   up? And why does the widget tool change the code in the form? I cant spot the
   error in the code.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 9 months ago](https://wordpress.org/support/topic/problem-with-widgets/#post-580370)
 * > _Why does the widget tool ignore _
 * Widgets completely replace your sidebar. Nothing you do in the sidebar.php file
   will affect the output of the page anymore, the widgets _replace _the sidebar.
   That’s the whole point of widgets, so that you don’t have to mess with hand editing
   sidebars anymore.
 * Go to Presentation->Sidebar widgets and configure them there. And if you want
   to change their styling, do it in the CSS file, not directly.
 *  Thread Starter [Janzomaster](https://wordpress.org/support/users/janzomaster/)
 * (@janzomaster)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/problem-with-widgets/#post-580373)
 * Ah, now I got it. I’ll just add the messed up widgets manualy. Thanks for your
   help!
 *  [sonria](https://wordpress.org/support/users/sonria/)
 * (@sonria)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/problem-with-widgets/#post-580640)
 * The instructions for adding the theme search form, as listed on Matt’s site, 
   are WRONG. Either that or they assume far too much php knowledge. But as it is,
   they create a parse error.

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

The topic ‘problem with widgets’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [sonria](https://wordpress.org/support/users/sonria/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/problem-with-widgets/#post-580640)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
