Widget Support in a 3rd Party Theme

I declared Hivepress support in a 3rd party theme. It works great.

I’d love to have a widget area display under the map on each listing. Is this possible?

It’s possible, but since registering widget areas is the theme territory this would require registering a sidebar with hp_listing_view_sidebar name, either with a custom code snippet or a plugin that allows registering custom widget areas:

add_action( 'widgets_init', function() {
	register_sidebar( [
		'name'          => 'Listing Sidebar',
		'id'            => 'hp_listing_view_sidebar',
		'before_widget' => '<div id="%1$s" class="widget widget--sidebar %2$s">', 
		'after_widget'  => '</div>', 
		'before_title'  => '<h3 class="widget__title">', 
		'after_title'   => '</h3>',
	] );
} );

That worked perfect. Thanks @ihor for the great support.

1 Like