Contact page template issue

Hi,

We don’t want Google map on our contact form. How to remove them from default template?

Also contact form does not show at all, rather it shows as contact form id = 265.

Can you please help to resolve this?

Thanks.

Hello @itsmehir,

Please try to do the following. Go to your public_html/wp-content/themes/sydney-pro-ii/page-templates folder via SFTP or cPanel, open page_contact.php file with a text editor, remove or comment out the following code, and save your changes.

<script type="text/javascript">
    jQuery(function($) {
        if ( $().gmap3 ) {
            $("#map").gmap3({
                map:{
                    options:{
                        zoom: 14,
                        mapTypeId: 'Idea_style',
                        mapTypeControlOptions: {
                            mapTypeIds: ['Idea_style', google.maps.MapTypeId.SATELLITE, google.maps.MapTypeId.HYBRID]
                        },
                        scrollwheel: false
                    }
                },
                getlatlng:{
                    address: "<?php echo $address; ?>",
                    callback: function(results) {
                        if ( !results ) return;
                        $(this).gmap3('get').setCenter(new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()));
                        $(this).gmap3({
                            marker:{
                                latLng:results[0].geometry.location
                            }
                        });
                    }
                },
                styledmaptype:{
                    id: "Idea_style",
                    options:{
                        name: "Map"
                    },
                },
            });
        }
    });
</script>

Please note that you have to override modified .php file in a child theme to avoid losing your modification after theme update (just create page-templates folder in your child theme folder and copy modified page_contact.php file there).

Then add the following CSS code.

You can add CSS code in DashboardAppearanceCustomizeAdditional CSS (WordPress 4.7 and up). Also you can add CSS code directly to style.css file of your child theme.

body.page-template-page_contact div#map {
    display: none;
}

Please create a separate topic for your second question in order to make it easier to help you.

Kind Regards, Roman.

Thanks Roman,

Map is gone from contact page, but so does a block or space. and its gone in a way that phone/email line has gone up a bit.

here is a link to the site.

Here is a link

Hello @itsmehir,

Please try to use this CSS code in addition to the code above:

body.page-template-page_contact div#content {
    padding-top: 150px;
}

Kind Regards, Roman.

Thanks, it has solved the issue for now. I believe I had change something in stylesheet because before even with display:none CSS code, the empty block was occupying the space.

You are welcome!

Kind Regards, Roman.