How to Make Street Address Optional

This topic contains 41 replies, has 7 voices, and was last updated by  HelloYoga 9 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #34791

    Paolo
    Site Admin
    Post count: 31206

    hi,

    with the following code added to your theme’s functions.php file, you will add css suggested by Gusst’s doc only for CPT = gd_place. Just change CPT name to apply to a different one.

    
    
    add_action('wp_head','a_cpt_w_no_address');
    
    function a_cpt_w_no_address() {
    
    $output="<style>span[itemprop='streetAddress'],
    span[itemprop='addressLocality'],
    span[itemprop='postalCode'],
    #geodir_post_address_row,
    #geodir_post_address_row,
    #geodir_post_country_row,
    #geodir_post_region_row,
    #geodir_post_city_row,
    #post_set_address_button,
    #geodir_post_zip_row {display:none;}  
    </style>";
    
    if ( 'gd_place' == get_post_type() || (isset($_GET['listing_type']) == 'gd_place') ) {echo $output; }
    
    }

    You can also disable a tab for a single CPT and I explain how here: https://wpgeodirectory.com/support/topic/hide-tabs-in-custom-post-type-2/page/2/#post-25090

    Let us know how you went.

    Thanks

    #35274

    laurence anthony
    Expired Member
    Post count: 293

    It would be nice to have a checkbox for the user to select to hide address from public display. We want to collect addresses for all listings so that we can send out mailers. But not all listings want their address public.

    Is it possible to add a Billing address (not publicly displayed) in addition to Physical address (publicly displayed) in the form? If so, will users be able to login to their account and add their billing address?

    #35339

    Paolo
    Site Admin
    Post count: 31206

    Actually we are considering removing options instead of adding other on top of the existing, because with this many options the core plugin is becoming heavier than we want it and it’s taking us in the opposite path we initially planned.

    Most options are useful only for a minority of memebers and once set are never changed, so it’s better to work with code snippets, cutting database queries, improving page loading time.

    You can add Billing Address as a custom field and set it to appear nowhere in the front end , so you can only see it from the backend.

    Thanks

    #35354

    HelloYoga
    Free User
    Post count: 48

    Hi Paolo,

    Actually we are considering removing options instead of adding other on top of the existing, because with this many options the core plugin is becoming heavier than we want it and it’s taking us in the opposite path we initially planned.

    Most options are useful only for a minority of members and once set are never changed, so it’s better to work with code snippets, cutting database queries, improving page loading time.

    Makes sense.

    However, rather than introducing methods that require customers to make child themes, perhaps you could make a new add-on module to sell which will offer options to set these various customizations to address fields. This way, you can make some money from selling the add-on.

    Best regards,
    Dylan Robertson

    #35355

    HelloYoga
    Free User
    Post count: 48

    So, perhaps an “Address Field Customizer” add-on is in order to tackle the various requests and use cases raised in this thread.

    I agree with Paolo, the core plugin should stay lean and focused.

    #36283

    HelloYoga
    Free User
    Post count: 48

    Attached is a mockup of how I’d like to be able to make a search page for teachers. No need for map or showing address. Just use drop-down menus to filter the listings.

    “Prefectures” (instead of state – we’re in Japan) – refers to the prefecture/state the teacher is based.

    “Active Areas” refers to states the teacher is active in (or prefectures in the case of Japan, where we’re based).

    I guess it’s not really the kind of application that Geodirectory was built for, but if this would be possible, please kindly let me know your thoughts on the best way to implement it.

    Best regards,
    Dylan Robertson

    #36285

    Guust
    Moderator
    Post count: 29970

    A bit like this?
    http://wpgeo.directory/all-locations/

    Use this shortcode: [gd_location_switcher]
    More at http://docs.wpgeodirectory.com/location-manager-shortcodes/

    #36287

    HelloYoga
    Free User
    Post count: 48

    Hi Guust,

    Thank you very much. I’ll review it with my developers.

    I see my upload failed (was only 526KB…), so here it is:
    https://www.dropbox.com/s/jutgmo6u90e1do2/Teacher_Search_Example.png?dl=0

    Best regards,
    Dylan Robertson

    #36332

    Guust
    Moderator
    Post count: 29970

    If you add relevant custom fields to your teacher custom post type, then you can use the advanced search to create a customised search that should make that possible.

    #36339

    HelloYoga
    Free User
    Post count: 48

    Hi Guust,

    thank you very much for your kindness. My developer will look into it.

    #46455

    HelloYoga
    Free User
    Post count: 48

    Hi Guys,

    I wanted to check-in on the status of this and ask for what advice you have on implementing a directory of yoga teachers and their events.

    Events will be as per standard Geodirectory Events functionality, but yoga teachers will be only listing their Country, State and City.

    Is this now possible or is situation same as above?

    If it is possible, what theme do you recommend? Can I use GD Framework theme without maps?

    I wanted to use Sky by Cohhe, but you can’t turn off the maps without some custom code…

    #46466

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    We now have the ability to have location-less post types, please see in GD>General>Select CPT to disable physical location.

    Hope this helps.

    Stiofan

    #46482

    Guust
    Moderator
    Post count: 29970
    #46486

    HelloYoga
    Free User
    Post count: 48

    Ok, this is great, but what this really tells me is that I need to hire a developer to figure GD out and get it setup properly. I can’t just install it and click around selecting various options. I need someone who understands coding and the system architecture to do it for me.

    I really respect you guys, but you need to realize that until GD reaches the level of usability where somebody without any technical background can use it, you’re only going to make a fraction of its potential sales.

    #46574

    Guust
    Moderator
    Post count: 29970

    If I understand your requirements correctly, these are your options out the box, no coding required:

    1. Use Places and Events CPT
    2. Turn off maps and locations: GD > general > general > Select CPT to disable physical location > pick Events and Places
    3. You can now add custom fields called country, state and city, OR
    4. Categorize your teachers by creating categories referring to country, state and region.

    OR

    5. Use Places and Events CPT
    6. Tick all boxes to hide the maps at GD > design > map > SHOW / HIDE POST TYPE AND CATEGORY ON MAP
    7. This will need some minor styling changes.

    You have to understand that a system that uses maps, cannot work unless you have a location on the map. And the simplest way to do that, is using addresses, but without a street address, a map can never show a location.
    That is why you either use the system without addresses all together (option 1 above), or if you want to use a customized version, that is option 2.

    Building in every possible option for every possible mutation would slow the software down, and make sites too slow.
    That is why the GD software is built to cater for 99% of users that use it with addresses, but the system allows customization if you have special requirements.

Viewing 15 posts - 16 through 30 (of 42 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount