Title: Editing theme &#8211; sidebar.php refuses to update
Last modified: August 19, 2016

---

# Editing theme – sidebar.php refuses to update

 *  [rrauso](https://wordpress.org/support/users/rrauso/)
 * (@rrauso)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/editing-theme-sidebarphp-refuses-to-update/)
 * I’ve updated a blog of ours which is using the twentyten theme and we are tweaking
   it to look like the actual website that is being built.
 * The problem I’ve encountered is that no matter what I do, the sidebar.php will
   NOT update! It’s weird because if I go into the editor, the code itself has been
   changed/updated, it’s just not translating to the actual site.
 * Other then the header and CSS, the sidebar and other .php includes haven’t been
   dramatically altered.
 * At this point I’ve uninstalled all plugins, I’ve cleared the browser cache and
   tried reverting to the old code. None have worked…

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

 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/editing-theme-sidebarphp-refuses-to-update/#post-1982175)
 * What is the exact change you’re making to sidebar.php, but that isn’t rendering
   as-modified?
 *  Thread Starter [rrauso](https://wordpress.org/support/users/rrauso/)
 * (@rrauso)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/editing-theme-sidebarphp-refuses-to-update/#post-1982194)
 * I’ve added some css classes and also deleted the search field:
 * <li id=”search” class=”widget-container widget_search”>
    <?php get_search_form();?
   >
 * Basically the extra css classes should call out some javascript I wrote to make
   the headers turn into drop down menu’s and the search function should be gone.
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/editing-theme-sidebarphp-refuses-to-update/#post-1982210)
 * Is the code that you modified inside of an `if ( dynamic_sidebar() )` conditional?
 * If so, go to Dashboard -> Appearance -> Widgets, and verify whether or not you
   have any Widgets assigned to the sidebar in question.
 *  Thread Starter [rrauso](https://wordpress.org/support/users/rrauso/)
 * (@rrauso)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/editing-theme-sidebarphp-refuses-to-update/#post-1982242)
 * Yes! So no matter what I edit in the php file, since they are widgets… I can’t
   change them in the code?
 * How would I go about adding classes to the widgets?
 * **if I edit the widgets in the widget are, they do indeed update
 *  Thread Starter [rrauso](https://wordpress.org/support/users/rrauso/)
 * (@rrauso)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/editing-theme-sidebarphp-refuses-to-update/#post-1982249)
 * example:
 *     ```
       <div id="secondary" class="widget-area" role="complementary">
       <ul class="xoxo">
       <li id="archives" class="widget-container widget_archive">
       <h3 headerindex="1h" class="widget-title opensubheader"><span class="accordprefix"></span>Archives<span class="accordsuffix"></span></h3>
       <ul>
       ```
   
 * I would like to add a class to the last `<ul>`
    -  which displays my archive list… is this possible?
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/editing-theme-sidebarphp-refuses-to-update/#post-1982276)
 * The code _inside_ of the `if ( dynamic_sidebar() )` conditional only outputs 
   if _no Widgets are assigned_ to the specified sidebar.
 * Regarding adding classes to existing Widgets: what are you trying to accomplish,
   that you are unable to do using the current classes applied to your Widgets?
 *  Thread Starter [rrauso](https://wordpress.org/support/users/rrauso/)
 * (@rrauso)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/editing-theme-sidebarphp-refuses-to-update/#post-1982319)
 * Thanks for your help Chip! I was able to get what I needed by getting rid of 
   the “if” statement.

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

The topic ‘Editing theme – sidebar.php refuses to update’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [rrauso](https://wordpress.org/support/users/rrauso/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/editing-theme-sidebarphp-refuses-to-update/#post-1982319)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
