Home Support Extensions Geolocation Moving the map

Moving the map

  • Author
    Posts
  • Kierrah

    Hi!

    I’m trying to use Hivepress to spin up an MVP quickly and it looks almost perfect for this but I cannot figure out how to customise the layout. I need to move the map to bigger and more prominent at the top of the listing page but I can’t figure out how to do this? What files am I supposed to be looking at?

    Any help is much appreciated, I’ve been away from WordPress for a few years and I’m a bit lost here.

    Thanks,
    Kierrah

    ihor developer

    Thanks! You can try using this PHP snippet to move it to the top:

    add_filter(
    	'hivepress/v1/templates/listings_view_page',
    	function( $template ) {
    		return hivepress()->helper->merge_trees(
    			$template,
    			[
    				'blocks' => [
    					'listing_map' => [
    						'type' => 'content',
    					],
    
    					'page_header' => [
    						'blocks' => [
    							'listing_map' => [
    								'type'   => 'listing_map',
    								'_order' => 15,
    							],
    						],
    					],
    				],
    			]
    		);
    	},
    	1000
    );

    And then adjust its height via CSS:

    .hp-page__header .hp-map {height:200px!important}

    tovarischnovoseltsev

    Tell me which hp to insert it into

    serhii developer

    You may use the Code Snippets plugin to insert there a PHP code snippet. https://wordpress.org/plugins/code-snippets/
    In order to insert a CSS code snippet navigate to the Appearance > Customize > Additional CSS section.

    zulazai

    Hi Serhii

    How to show the map on top on mobile view for single listings and not the listings page. What’s the css snippet for this please share thanks

    serhii developer

    Sorry, but there’s no simple code snippet for this, this requires extra PHP & CSS customizations.

    tovarischnovoseltsev

    How do I place a map on the home page?

    tovarischnovoseltsev

    how to place the map and graphic category buttons on the same page.

    serhii developer

    Sorry, there’s no way to display a map outside of the listing pages at the moment, but thanks – we’ll consider adding a Map block for placing it on other pages. Here’s a related topic https://hivepress.io/support/topic/map-on-home/#post-12176

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

You must be logged in to reply to this topic.