Join our new community forum for support & discussion

Join Now

Home Support Extensions Opening Hours Opening hours of the current day to be displayed in the block primary area

Opening hours of the current day to be displayed in the block primary area

  • Author
    Posts
  • alexif

    Hello!

    Is it possible to display the opening hours of the current day in the block primary area?

    Thanks!

    yevhen developer

    Please try this PHP snippet but please note that it can require further customisation

    add_filter(
    	'hivepress/v1/templates/listing_view_block/blocks',
    	function ($blocks, $template){
    		return hivepress()->helper->merge_trees(
    					[ 'blocks' => $blocks ],
    					[
    						'blocks' => [
    							'listing_footer' => [
    								'blocks' => [
    									'listing_opening_hours' => [
    										'type'   => 'opening_hours',
    										'model'  => 'listing',
    										'_order' => 30,
    									],
    								],
    							],
    						],
    				]
    				)['blocks'];
    	},
    	1000,
    	2
    );
    alexif

    Thank you for the solution provided!

    It actually works better with the secondary block integration. Looks good without any other adjustments.

    Thanks a lot!

Viewing 3 posts - 1 through 3 (of 3 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.