I think you missed , at the of after_title that’s why it’s not working. Use this code it’s working fine.
register_sidebar( array(
'name' => 'Custom code widget',
'id' => 'custom-code',
'description' => 'Cutom code for all pages.',
'before_widget' => '<div class="custom-description">',
'after_widget' => '</div>',
'before_title' => '<div class="custom-code-title"><h2 class="widget-title">',
'after_title' => '</h2></div>',
) );
Related Posts:
- Is there any way to dynamically alter widget titles?
- Translate widget titles using qTranslate plugin
- Insert a span inside widget title to give a different color to the second word
- Add Descriptive text to Widget text box so users can see what they contain
- Get widget Title from widget id
- How to get “Widget Logic” plugin’s input value in a custom widget code (to display on the Widget admin page)
- WordPress widget title coding
- Ampersand breaking Widget title
- Why would apply_filters return a non-empty string, when the value returned is empty?
- Truncate Widget Title
- Widget title showing below widget
- conditional widget title
- Code for Recent Posts Widget
- Is there a way to add more tags to the tag cloud?
- Modify recent post sidebar to show post thumbs with out plugins
- Why Can’t wp_editor Be Used in a Custom Widget?
- How to listen to color changes on the color picker?
- Add New Footer Widget Area with Limited Options?
- Add div class to only one widget
- Updating to Version 4.5 bumped my “main sidebar” widget out of place
- How can I delete all inactive widgets?
- Call sidebar from a template
- Widget Area: Modify $param[‘xy’] from widget-$n
- Widget area inside a widget
- Defer Code in Widgets – Page Speed
- How to limit wp_get_archives to show months for the X years only
- Bolding specific word(s)/parts of widget title
- Adding a widget to a string of HTML
- Pass variables from one widget to another widget
- Remove the widgets tab from theme customizer
- Remove/Add widgets from/to the Available Widgets pool
- How can I apply css styling to the current day in the calendar widget
- AJAX Contact Form Issue
- Including PHP files doesn’t work outside of Localhost
- Is there an official email form widget or block?
- Widget html code error
- Display sidebar only if it has content
- Post-specific widgets in WordPress ‘Twenty Fourteen’ theme
- Excluding specific widgets from default sidebar class
- Can’t see widget areas in my customizer
- Display custom widget, added as a shortcode in the correct place
- Show posts from one category with thumbnail and description on latest
- Enqueue script/style if certain widget has certain value
- How to display/register widget only on post pages in custom plugin
- Is it possible to display tag cloud widget by category?
- Widgets not saving values
- Dynamically add content to an existing widget area
- Issue understanding and using WordPress filters and actions
- How can I inject html after the [x]th widget inside a Sidebar? [duplicate]
- RSS dashboard widget not showing visuals
- Simple widget causing whitescreen
- How to stop comments widget conflicting with theme comments
- How do I create a widget to embed the code for a sign up form, so that the sign up form appears on every page?
- Grabbing how Many Posts by Month for a Dashboard Widget
- How to change the default class for the widget title?
- How to add the same widget twice?
- How to hide widget if current category has no posts assigned to it?
- wp_dropdown_pages in widget form
- Unable to load “wpColorPicker” on theme customize page
- Undefined Variable in my widget
- Update widget form after drag-and-drop “only specific plugin”
- How do I create a template page with a specific widget as the content?
- Placing a widget with $wpdb query
- Loading the native WordPress image uploader in custom widget
- How Migrate a Legacy Widget to block?
- How to allow editing of text in sidebar?
- Shortcode into widget
- Creating a dynamic class name in my custom widget
- Want to add more option in “Sexy Login”
- Catagorized hierarchy menu for PAGES!
- How to show avatar of current logged in user in a widget
- WordPress Local to Live and The Missing Widgets!
- Extending the WordPress Recent Posts Widget
- delete widget upon uninstall
- Unable to see Widget Submenu under Appearance with Class Based WP_Widget
- How to update a widget data?
- Recently changed domain name. Home page widgets are now not in the customize menu yet still being on the page
- Make widget with media upload repeatable
- I accidentally added a widget area called sidebar 1
- wp_registered_widgets doesn’t contains my widgets
- How can I write this code snippet so that it echo’s the response when submitting empty fields?
- How Can I Replicate & Register a Widget from the Child Theme
- How to retrieve category ID’s from widget settings?
- My plugin works in home page, but doesn’t work in post page
- Widget text color change
- How to create another widgets.php page
- widget that will do shortcodes that user inputs
- Widget dynamically add new input field
- Widget Development – Displaying dropdown content
- WordPress function breaks widget’s markup?
- Registering multiple copies of a widget
- menu in different page in different style
- Add text to Text Widget using Javascript
- Widget logic not working
- Subpages menu on sidebar plus widgets
- Widgets in PHP files?
- Text Widget Not Working
- Sample widget code which get data(1-5 record) from Wp_Admin panel and display to Homepage(WordPress Custom Theme)
- Can’t edit the widgets sidebar or footer
- Custom dashboard widget – load style only for added widget