Add a third page area for attributes

Hi there!

Is it possible to add a third page area for attributes?

Currently there is the “Page (Primary)” and “Page (Secondary)” area. I want to add a third position right below these two areas and above the Related Listings section, like shown in the screenshot:

Could you please provide a code to add that third area please?


If it’s not possible, is it possible to move specific attributes (maybe with a .class) and a php-snippet to that location?


If any of the above is possible, is it also possible to move the Reviews and the Location section also to that location above the Related Listings section?

Thank you a lot for your help!

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

add_filter(
	'hivepress/v1/templates/listing_view_page',
	function( $template ) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'page_sidebar' => [
						'blocks' => [
							'listing_map' => [
								'type' => 'content',
							],
							
							'review_submit_link' => [
								'type' => 'content',
							]
						]
					],
					
					'page_content' => [
						'blocks' => [
							'listing_map' => [
								'type'       => 'model_map',
								'_label'     => esc_html__( 'Map', 'hivepress-geolocation' ),
								'_order'     => 1000,

								'attributes' => [
									'class' => [ 'hp-listing__map' ],
								],
							],
							
							'review_submit_link' => [
								'type'   => 'part',
								'path'   => 'listing/view/page/review-submit-link',
								'_order' => 999,
							]
						]
					]
				],
			]
		);
	},
	1000
);

Thank you, but …

  1. it doesn’t seem to do anything other than changing the order inside the left sidebar. It doesn’t move the Location / Review section outside the sidebar and onto the lower section.

  2. Also no third area is created?

Sorry, but am I missing something here?

  1. Please try this PHP snippet instead
add_filter(
	'hivepress/v1/templates/listing_view_page',
	function( $template ) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'page_sidebar' => [
						'blocks' => [
							'listing_map' => [
								'type' => 'content',
							],
							
							'review_submit_link' => [
								'type' => 'content',
							]
						]
					],
					
					'page_footer' => [
						'blocks' => [
							'listing_map' => [
								'type'       => 'model_map',
								'_label'     => esc_html__( 'Map', 'hivepress-geolocation' ),
								'_order'     => 2,

								'attributes' => [
									'class' => [ 'hp-listing__map' ],
								],
							],
							
							'review_submit_link' => [
								'type'   => 'part',
								'path'   => 'listing/view/page/review-submit-link',
								'_order' => 1,
							]
						]
					]
				],
			]
		);
	},
	1000
);
  1. Unfortunately, there is no such possibility, it requires advanced customization

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.