this is the solution to wrap the content after the title like this
'before_widget' => '<li>',
'after_widget' => '</div></li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2><div class="widgetcontent">' ); ?>
the important markup is the <div class="widgetcontent>"
in the after_title, and the closing </div>
in the after_widget, this will result in this html markup:
<ul>
<li>
<h2 class="widgettitle">Title</h2>
<div class="widgetcontent">
<!-- widget stuff-->
</div>
</li>
</ul>
Related Posts:
- HowTo: Add Class to Sidebar Widget List-Items
- How to get the name and description of a sidebar in theme?
- Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying
- How the WordPress sidebar works
- Best practices: Custom theme sidebar menu – hardcode or widget?
- Undefined index: custom_sidebars
- register_sidebar ignores ‘id’ and ‘class’
- Add class to before_widget for all widgets with a dropdown and a counter
- Can not Remove Archives and Meta from Sidebar
- How to allow admins to create a sidebar from the admin
- How to add multiple custom widget areas
- How do I display the “Archives” widget layout (sidebar) in WordPress by ‘year’ then by ‘months’?
- how do I get a sidebar’s id or number for use with is_active_sidebar()
- how can I remove the sidebar from my wp homepage [closed]
- Toggle Sidebar Display
- searchform.php override not working
- Displaying details of a post in a sidebar
- “Theme without sidebar.php is deprecated”
- Load sidebar template just once to prevent multiple animations
- Register sidebar ‘before’ and ‘after’ html as div rather than li tags
- How is the `get_sidebar` function meant to be used to call a 2nd sidebar?
- Should I create multiple sidebars, or use or one dynamic sidebar with logic to determine it’s abilities?
- How can I hard code my sidebar?
- Should is_active_sidebar() always be used around dynamic_sidebar()?
- Load different single.php templates according to post layout selection
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- How to add sidebar to Isola theme? [closed]
- Why the dynamic_sidebar() call is putted into an ul tag?
- Allow different tags in widget titles
- Change the sidebar from left to right twentyfourteen theme
- Changing sidebar.php and footer.php depending on URL
- Recommended sidebar / content widths
- Hide/disable sidebar using shortcode?
- How to setup sidebar modules to use jQuery Accordian
- Sidebar not displaying (theme development)
- Cold Fusion to WordPress
- Display problems in admin dashboard when creating a new theme from scratch
- Create new sidebars trough admin post/page metabox
- Best strategy for providing theme options using customizer
- Creating a Playlist of Widgets
- How to display only some widgets of a sidebar?
- How to Remove Sidebar when get_sidebar() is not get called in page?
- WordPress two sidebar layout or theme
- How to create multiple sidebar areas with a forloop and register_sidebars?
- Conditional tags issue for multiple is_page() conditions in sidebar.php
- Add the title of a widget as an ID – for anchor links
- Incorrect sidebar showing on WooCommerce Store page [closed]
- Replacing static code in a template file with a sidebar and widgets?
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- Bestway To Define Theme and Plugin path and url
- Form to Add Posts to Custom Post Type
- How do I add settings to the Background Options Page?
- What is the right way to include a wp-admin file in your theme?
- How to force Media manager to overwrite files of same name?
- How wp_cache is supposed to work, and does it help with performance?
- is_home() returns false on the home page! When is the home page NOT the home page?
- Enabling Widgets By Default in Custom Theme Development
- How to fix the error “file_get_contents was found in the file functions.php”?
- Identifying the priority of style.css so I can make a small CSS file load last
- WordPress Customize — Move “menus” options / field to another section
- How to use the responsive images feature from WP 4.4 in your themes
- What are WooCommerce starter themes? [closed]
- Convert PHP readfile to WP_Filesystem
- Wysiwyg editor for P2 theme
- Sub folder CSS that’s read by Admin panel
- Dequeue a style file which is making website load slow!
- How to customize save function event?
- WordPress page templates in a directory
- Do I need normalize.css when developing my own WordPress-theme?
- Limit Loop to 5 Posts?
- Theme-wide custom post template
- How to add Space between sidebar and footer widget in WordPress theme [closed]
- Custom Navigation build using wp_nav_menu and walker
- Question regarding WP multisite feature
- Call to undefined function add_menu_page() on theme activation
- Should all references to a text domain be to my current theme?
- Simple child theme modification but links are broken
- Doing context-aware previews in the WordPress Customizer
- First post full width without Sidebar
- best practices for updating wordpress theme
- Multi Site Setup, Child Themes, Getting Style Sheet Directory
- Exclude parent categories from the_category() within the loop
- How do I pass the category object to a function when is_archive() is true?
- Making a horizontal flyout menu from WordPress category listing
- How to use Canonical URL meta tag to avoid duplicate content issues with WP home pages
- getBoundingClientRect() showing different values on load vs scroll
- How can I set multi archive page template on same time for only one custom post type?
- Exclude categories from wp query not working
- Copying a modified theme from one wordpress site to another wordpress site [closed]
- Customizer Image-Picker Preview Not Working
- How to get url image page the right way?
- Mobile view logo background colour in wordpress
- Strip HTML tags on custom code from the_content
- page.php is not called when I load a Page
- How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?
- WordPress loop not working on blog.php page
- Option to show/hide widget depending on is_home?
- How do I middle-align my header menu items in WordPress [closed]
- How to add Dummy content when active wordpress theme without xml import?
- ways to create customized theme (hard coded – no pagebuilder)