Move button in the sidebar

Hello dear Hivepress community!

Check this:

I want the button to be under the price in right side bar so I can collect interest submitions easily. Right now it works, but it doesnt look very good.

The button is for being interested in the specific apartment listing. So would really appreciate if we some how can add the button to the sidebar where the price is showin in the right column.

I added an image of the button I want moved.

Best regards,

Please provide more details on how this button was added to the page

As a possible solution please try to edit the listing page with the HivePress/Templates. There is a possibility to make changes on the page with the Gutenberg blocks. Here is a tutorial Overview | HivePress Templates - YouTube

This button was created using elementor - create template - then added using shortcode in hivepress listing.

Please clarify how it was added in HivePress listing, does Elementor override the template for the “listing” post type or you inserted this button to the sidebar widget area? The possible solutions depend on how this button is embedded into the listing template.

It was added like this:


Ive tried using gutenberg but can not seem to add like I want… Because I want to show the price of the listing , then below i want to show the button with the “contact for this listing”

Unfortunately it will not work this way, you’d have to create or insert the shortcode to each listing description. Please try using the existing features, e.g. if you use the a custom Price attribute in Listings/Attributes and assign it to the Page (Primary) area it’ll be displayed. Also, if you use the Messages extension it’ll show the Reply to Listing button under the price, you can rename this button via Loco plugin.

I am aware i need to add it to each listing manually thats why im writing here…

Ive tried messages extension, But it Will only let you leave a message. I can translate the Button but i want the visitor to leave certain info like, name, email, phone, etc.

There are two possible solutions.

  1. Please try to put the shortcode (which you have put into the listing description) with a Text widget to Listing (sidebar) widget area in Appearance/Widgets. But then it will always be on the last position on the sidebar on the listing page

  2. Please try this PHP snippet. Please change any_shortcode_here in the code snippet with your shortcode

add_filter(
	'hivepress/v1/templates/listing_view_page',
	function( $template ) {
		return hivepress()->template->merge_blocks(
			$template,
			[
				'page_sidebar' => [
					'blocks' => [
						'custom_form_shortcode' => [
							'type' => 'content',
							'content' => do_shortcode('[any_shortcode_here]'), 
							'_order' => 10,
						],
					],
				],
			]
		);
	},
	1000
);