This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Reply To: Floating widget area as shortcode

Jason Bobich

I think you could pretty easily show a widget area in a shortcode, but it honestly really wouldn’t even have much to do with the theme. I suppose you’d be creating the widget area under Appearance > Widget Areas, but outside of that all the functionality would just be basic WordPress stuff. Something like this, maybe:

[widget_area id="your-sidebar-id"]
function my_widget_area_shortcode( $atts ) {
     dynamic_sidebar( $atts['id'] );
     return ob_get_clean();
add_shortcode('widget_area', 'my_widget_area_shortcode');