Keep a Listing Location "Private" off of the map
This topic contains 5 replies, has 3 voices, and was last updated by Hayley Kirkman 5 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 17, 2020 at 5:34 am #535492
Hi,
I created a custom post type called “private places” and within the settings for this CPT I selected for the address information to be hidden. I want this option to be available for those who want to list in the directory but keep their address private.
My question. How do I enable a drop down on the “Add Listing” page to allow the user to choose if they want to choose “Places” or “Private Places” as their custom post type when they are registering on the following page?
https://durangocreativedistrict.org/add-listing
By default will these “Private Places” also be shown on the map and in list view just like the regular “Places”?
Thanks,
HMarch 17, 2020 at 6:31 am #535498I went ahead and setup both custom post types to be identical except the private one has the address info hidden.
ADD LISTING: https://durangocreativedistrict.org/add-listing
ADD PRIVATE LISTING: https://durangocreativedistrict.org/add-listing?listing_type=gd_private_placeI am just curious if there is a way to have these options selectable from the /add-listing page or if I have to show two buttons. 1. Add Public Listing 2. Add Private listing which would then take the user to the two pages above?
Also, is there any way to have both of these show up on in the list view together? I did a test and cannot see the private CPT within my https://durangocreativedistrict.org/places page.
Lastly, I cannot seem to figure out how to get the CPTs to show on the search. I have the advanced search add-on installed.
Thanks,
HMarch 17, 2020 at 7:03 am #535500Hi Hayley Kirkman,
Thanks for your post. You can try manually adding the menus to your Website following the instructions here https://www.wpbeginner.com/beginners-guide/how-to-add-navigation-menu-in-wordpress-beginners-guide/ .
The CPT selector should display on the search form as explained here https://wpgeodirectory.com/docs-v2/addons/advanced-search/#shortcodes if you’re using the parameter. Could you share your Website WP admin access here in private reply so that we could check on it ?
March 17, 2020 at 12:24 pm #535514Hello,
What we recommend is that you add links to each of your CPT Add Listings pages using the GD Navigation menu options
https://wpgeodirectory.com/docs-v2/geodirectory/navigation/
Also see examples here for show/hide address and map:
https://wpgeodirectory.com/docs-v2/design/gd_dynamic_content/#examples
You can also add additional content to the Add Listing page ABOVE the gd_add_listing shortcode
March 25, 2020 at 12:19 am #536610I am trying maybe a more simple way. I added a field under the “Settings” tab of my places CPT. It is just a radio button that asks if the business is public or private. How do I get the answer to this question to show up on the listing page for the public to see if they checked the public or private box?
March 25, 2020 at 3:14 am #536630I actually found a way to do this in case you ever have someone ask in the future.
1. I created a radio question in (places > settings) for “private” or “public” to be asked at the time of setting up the listing. Under the option values I put the following code.
“YES – Visit anytime during business hours./0,NO – Please e-mail or call for appointment./1”
This adds the question to the /add-listing page.
2. Based on what they answer I used the following to hide the map if the users selects “private” on the /gd-details template page.
[gd_dynamic_content key=”is_this_business_open_to_the_public_” condition=”is_equal” search=”0″][gd_map][/gd_dynamic_content]
3. Then the following to hide/show the address for the same question criteria.
[gd_dynamic_content key=”is_this_business_open_to_the_public_” condition=”is_equal” search=”0″][gd_post_meta key=”address” alignment=”left” text_alignment=”left”][/gd_dynamic_content]
4. I also use the following code to display the public vs. private message on the listing page so the public can see it just under the address or lack of address for private listings.
[gd_post_meta key=”is_this_business_open_to_the_public_” alignment=”left” text_alignment=”left”]
Thanks again for your help and recommendations. I just wanted to post this in case anyone else simply needed to hide the address or other data for a “private” directory listing.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket