Title: Unruly widgets
Last modified: August 19, 2016

---

# Unruly widgets

 *  Resolved [KayMac](https://wordpress.org/support/users/kaymac/)
 * (@kaymac)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/)
 * The site I’m working on is [http://www.quiltpuppy.com/dogblog](http://www.quiltpuppy.com/dogblog),
   using 2.8.1. (Yes, I know, it’s dogblogging but will you help me anyway? 🙂
 * The theme seems to have hard-coded sidebar items. My understanding is that if
   I put a widget in using admin, these are supposed to go away. However, they do
   not go away. The widgets I add appear in addition to them.
 * Compounding the problem: I have the disappearing widget phenomenon. Appearance
   >widgets… dragging and dropping widgets to the sidebar, then there’s nothing 
   in the sidebar area. Then sometimes there is. And sometimes they’re not the ones
   I put there most recently. Usually they do appear on the site though. Except…
 * Compounding the problem… the Links (also Linkslist) widget won’t appear on the
   site no matter how may times I drag it to the sidebar in admin.
 * This is in sidebar.php:
 * <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ); ?>
 * And this is in functions.php:
 * <?php
 * if ( function_exists(‘register_sidebar’) )
    register_sidebar(array( ‘name’ =>‘
   Left Sidebar’, ‘before_widget’ => ‘<div class=”menuheader”></div><div class=”
   menucontent”>’, // Removes
    -  ‘after_widget’ => ‘</div><div class=”menufooter”></div>’, // Removes
    -  ‘before_title’ => ‘<h5>’,
       ‘after_title’ => ‘</h5>’,
    - Any help?
    - Thank you so much!

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140506)
 * It does sound as if you have some hardcoded link or template tags in your sidebar
   as well as a widget-ready area. You’d need to edit your sidebar to either remove
   the unwanted code or move the `<?php if ( !function_exists('dynamic_sidebar')
   || !dynamic_sidebar() ); ?>` line so that it appears immediately after the first`
   <ul>` tag.
 * The second problem sounds like a plugin or theme issue. Try deactivating **all**
   plugins and/or switching to the default theme.
 *  Thread Starter [KayMac](https://wordpress.org/support/users/kaymac/)
 * (@kaymac)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140525)
 * esmi, thank you for chiming in. Moving the line did not help (at least if I did
   it right). That made an admin widget appear on top of a coded widget. So I commented
   out the coded widgets in sidebar.php and that did make them disappear.
 * Second problem… switching to default theme and then back again seems like it 
   may make the widgets stick in admin. Will need to play with this some more.
 * Only problem left… links/linklist are being stubborn and will not show up on 
   site. Not even in default theme. Why might this be?
 *  Thread Starter [KayMac](https://wordpress.org/support/users/kaymac/)
 * (@kaymac)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140544)
 * A little progress… if I switch to default theme and *then* add the Links widget,
   Links show up on the site.
 * Something in my theme is suppressing the links widget. Where would I look to 
   address this?
 * Many thanks
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140550)
 * Difficult to say. You could try functions.php but it may be difficult to spot.
 *  Thread Starter [KayMac](https://wordpress.org/support/users/kaymac/)
 * (@kaymac)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140555)
 * Well, here it is!
 * _(Edit: removed by mod.. Please post large sections of code on a pastebin site
   then post the links back here.. large code posts in these forums messes them 
   up)_
 * Comment something out? Replace something? Any thoughts? Most grateful for the
   help.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140556)
 * Post the entire contents of your sidebar and functions files on [http://wordpress.pastebin.com](http://wordpress.pastebin.com),
   then post the resulting links back here. This will let people see what you’re
   facing and tell you how to fix it.
 *  Thread Starter [KayMac](https://wordpress.org/support/users/kaymac/)
 * (@kaymac)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140557)
 * Thanks Otto, will do. I didn’t know about pastebin. I posted the above before
   I read yours. K.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140559)
 * Also, looking at that code you posted (before I had to remove it), if you comment
   this out, then it’ll disable the theme’s links replacement widget:
 *     ```
       if ( function_exists('register_sidebar_widget') )
           register_sidebar_widget(__('Links'), 'widget_techdesigns01_links');
       ```
   
 *  Thread Starter [KayMac](https://wordpress.org/support/users/kaymac/)
 * (@kaymac)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140562)
 * functions.php: [http://wordpress.pastebin.com/m6ab46d3b](http://wordpress.pastebin.com/m6ab46d3b)
 * sidebar.php: [http://wordpress.pastebin.com/d407535b2](http://wordpress.pastebin.com/d407535b2)
 * Hope I did it right!
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140568)
 * Instead of using <!– and –> to comment sections out, use these: `<?php /* ?>`
   and `<?php */ ?>`
 * Slightly faster site that way. Also, it prevents the PHP code from running, which
   you need to disable things like the search and/or links modifications being made
   by the theme.
 *  Thread Starter [KayMac](https://wordpress.org/support/users/kaymac/)
 * (@kaymac)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140584)
 * Thanks for hanging in there with me, total amateur that I am. (But liking the
   learning!) I did the above, and the built-in sidebar items are all suppressed.
   However, still, the Links or Linklist widget does not make links appear in the
   sidebar using this theme. I’ve done so much to tweak this theme with success,
   I feel like I’m aaaalmost there if I can just solve this one.
 * Am having crazy thoughts of making a kludgy workaround by using the built-in 
   links and replacing the graphic to make it look like the others. But then would
   have little control over order of items in the sidebar. Save me from this fate.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140590)
 * In this: [http://wordpress.pastebin.com/m6ab46d3b](http://wordpress.pastebin.com/m6ab46d3b)
 * You have the search thing commented out, but not the links widget.
 * Make sure you’re commenting out what I posted, not something else.
 * This has all the three widgets modified by that theme disabled:
    [http://wordpress.pastebin.com/m3fb3b368](http://wordpress.pastebin.com/m3fb3b368)
 *  Thread Starter [KayMac](https://wordpress.org/support/users/kaymac/)
 * (@kaymac)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140603)
 * Moderator sir, you are a rock star!
 * I really had tried what you said before, but apparently did not do it correctly.
   I had then commented out the theme widgets in sidebar.php instead of in functions.
   php. I was flailing around the solution. Thank you so much for actually fixing
   the file for me. All is now well.
 * Kay

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

The topic ‘Unruly widgets’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 3 participants
 * Last reply from: [KayMac](https://wordpress.org/support/users/kaymac/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/unruly-widgets/#post-1140603)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
