How to use GD without street addresses?

From version of the GeoDirectory core plugin and version 1.1.6 of the Custom Post Type addon, you can use listing types that do not need an address, and that will not be displayed on the maps.

Until then (or if you do not use the Custom Post Type addon), for the maps to work correctly, every listing in your directory needed an exact location on the map.

But that does not mean that you have to display the address of the listing.

This article explains how you can hide your street addresses. This might also be hqndy if you want to add listings to the maps, but you want to hide street addresses, or country details etc.

Hiding the address on the detail page

This will apply to all your listings.

The display of the different levels of the address are controlled by CSS classes:

    1. span[itemprop=”streetAddress”]
    2. span[itemprop=”addressLocality”]
    3. span[itemprop=”addressRegion”]
    4. span[itemprop=”addressCountry”]
    5. span[itemprop=”postalCode”]

    For example, if you only want to display the region and country, add this to your child theme’s style.css file:

    span[itemprop="postalCode"] {
    display: none;

    Modifying the Add Listing page

    This can be applied differently for each Custom Post Type.

    Option 1: Require street input (recommended)

    Edit GD > Place Settings > Custom fields > Field:Address > Front end description.

    For example: The street address will not be shown on your listing, but your business location will be shown on the map at this address. You can also just enter the city name for a more generic display on the map. 

    Option 2: Do not require street input

    You can remove the requirement for the street address by CSS:

    [css]#geodir_post_address_row {
    display: none;

    This option means that the street address will be calculated by the Google map and will be either the address where the marker is dragged, or the city name if Set Address On Map is clicked.

    Option 3: Remove all address fields (not recommended)

    You can remove all the address fields and set addresses by dragging the marker on the map only. The Google API will still fill in the complete address, but it will not be displayed on the Add Listing form.

    This option can lead to incorrect locations being added to your database, and might require some maintenance.

    Add this to your CSS for option 3:

    #geodir_post_zip_row {
    display: none