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 TicketTagged: address, disable maps, fields, freelancers, location, maps, teachers
-
AuthorPosts
-
March 21, 2015 at 4:22 pm #34791
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
March 26, 2015 at 2:17 pm #35274It 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?
March 26, 2015 at 8:46 pm #35339Actually 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
March 26, 2015 at 10:20 pm #35354Hi 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 RobertsonMarch 26, 2015 at 10:37 pm #35355So, 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.
April 6, 2015 at 1:28 am #36283Attached 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 RobertsonApril 6, 2015 at 1:37 am #36285A bit like this?
http://wpgeo.directory/all-locations/Use this shortcode: [gd_location_switcher]
More at http://docs.wpgeodirectory.com/location-manager-shortcodes/April 6, 2015 at 1:48 am #36287Hi 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=0Best regards,
Dylan RobertsonApril 6, 2015 at 10:27 am #36332If 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.
April 6, 2015 at 12:11 pm #36339Hi Guust,
thank you very much for your kindness. My developer will look into it.
July 22, 2015 at 7:41 am #46455Hi 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…
July 22, 2015 at 9:16 am #46466We 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
July 22, 2015 at 11:26 am #46482July 22, 2015 at 11:47 am #46486Ok, 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.
July 22, 2015 at 10:27 pm #46574If 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. -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket