Title: Replace default widgets from functions.php file in WordPress theme
Last modified: August 19, 2016

---

# Replace default widgets from functions.php file in WordPress theme

 *  Resolved [Wex](https://wordpress.org/support/users/wex/)
 * (@wex)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/replace-default-widgets-from-functionsphp-file-in-wordpress-theme/)
 * I’m creating a WordPress theme that relies heavily on the default WordPress Widgets.
   The default Widget markup won’t work in my theme, so I have essentially re-written
   the widget markup for the Archives, Categories, Search, tag wall, etc to display
   how I’d like it to display in the theme.
 * The only problem is that this only works when I’m using a “static” sidebar. When
   I switch to the dynamic sidebar (by enabling the specific widget(s)), it goes
   back to the generic markup for each enabled widget, which is not what I want.
   Is there any way to override the markup for widgets on a per-widget basis (Basically,
   is there a way to change what is output if a user enables that widget)? I’ve 
   read on the WordPress Widget API ([http://codex.wordpress.org/Widgets_API](http://codex.wordpress.org/Widgets_API))
   that something needs to be done with registering sidebars and such, but I can’t
   figure it out. Does anyone have any tips?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Wex](https://wordpress.org/support/users/wex/)
 * (@wex)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/replace-default-widgets-from-functionsphp-file-in-wordpress-theme/#post-1339767)
 * This actually doesn’t seem too practical. Nevermind.

Viewing 1 replies (of 1 total)

The topic ‘Replace default widgets from functions.php file in WordPress theme’ is
closed to new replies.

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [Wex](https://wordpress.org/support/users/wex/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/replace-default-widgets-from-functionsphp-file-in-wordpress-theme/#post-1339767)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
