Connecting Custom Post Types
This topic contains 13 replies, has 4 voices, and was last updated by Guust 7 years, 2 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: CPT, Custom Post Types
-
AuthorPosts
-
September 12, 2017 at 1:14 am #395245
Hello,
I want to be able to connect my custom post types by links or preferably, using a grid view. I used this shortcode: `[gd_listings post_type=”gd_place” layout=”3″ post_number=”6″ list_sort=”random” add_filter_location=”true”] in one of my Attraction listings. It does provide a grid view of my place listings, but it’s showing all of my place listings, not a location related result. Am I missing something in my shortcode or is there a better way to go about this? Ultimately, being able to interconnect my “Attractions”, “Restaurants” “Shopping” and “RV Park” post types in a way like the default Nearby tab does would be the best case scenario.
Thank for the help!
MikeGeodirectory 1.6.23 / Supreme 1.1.6 / WP 4.8.1
September 12, 2017 at 1:19 am #395247This reply has been marked as private.September 12, 2017 at 1:35 am #395250Enable location refers to the location selected by the visitor as shown in the Change Location Switcher.
I cannot think of any way to achieve that without customization, but I’ll get the others to have a look at your question too.Thanks
September 12, 2017 at 2:42 pm #395331Thanks for giving this some thought Guust. I would appreciate any input that you or others might be able to provide. With my projected number of listings in multiple CPTs, a way to link them dynamically is what I’m hoping for!
Thanks again
September 13, 2017 at 1:22 pm #395508Hi Mike,
If i understand correctly, what you want is a tab for a CPT that will just list them in order of distance to the currently viewed post?
Stiofan
September 13, 2017 at 6:14 pm #395580Hello Stiofan
Yes that’s correct. A tab would be very nice. Or a widget that could be added to the bottom section of a listing detail page or side bar. I was hoping that I could get a shortcode to work in an html field under a fieldset, but that was unsuccessful and maybe misguided.
In my mind, whatever used needs to be location sensitive. So that I could generate a list or grid view of Restaurants, Stores, Attractions, etc. near a particular Hotel, for example. And have that list or grid appear on the Hotels detail page. Maybe what I asking for is overly ambitious??? but it seems like a natural fit for Geodirectory.
Thanks for your thoughts on this!
MikeSeptember 13, 2017 at 6:18 pm #395582Or…maybe there’s already a way to do this and I’m just not seeing it 🙂 Any direction you guys can provide would be appreciated!
Mike
September 13, 2017 at 7:01 pm #395588Digging a little deeper… seems like the CPT Listings widget could be an option if it had a Location Filter option or the Related Listing widget would be a possibility if the individual CPTs were a selection option in the Relate to: dropdown box.
Just a thought
September 14, 2017 at 11:08 am #395689Would a link to a search page do, that is relatively simple and could order listings by proximity to the listing?
Stiofan
September 24, 2017 at 10:17 pm #397168That is certainly a possibility Stiofan, I’ll look into that. After digging into the widget options further, I’m confused why the Popular Post View widget won’t work for this. All the widget options seem to fit my needs perfectly. And with the ability to enable the location filter…I figured I had struck gold…but the location filter doesn’t seem to work. Guust said earlier in this thread that the location filter ties directly to the location changer. So I figure if I use the location changer to select a city, then select a place from the listings provided…the Popular Post View widget in that listings detail page should be showing the other places in that city (since the enable location filter is enabled) but it’s not. It’s showing places (listings) from other cities and states. That doesn’t seem right. I would also figure that since I had selected a city in the location changer, that city would still be selected, but it’s not…the location changer has gone back to its default everywhere setting. Is that whats supposed to happen? I’m confused to say the least 🙂 From my point of view, the Popular Post View widget would be one perfect way to interconnect CPT listings within the same city…if the location filter works the way I’m thinking it should work.
Thanks for helping me work through this!
September 25, 2017 at 1:53 am #397173The behavior you describe is consistent with GD permalinks set NOT to include the location in the URL.
Change that setting at GD > permalinks > Add location in urls [make sure that it includes region and city].
Then save WP Settings > Permalinks and check.Let us know.
September 27, 2017 at 6:14 pm #397732Fantastic…that totally solved my issue, thanks Guust! So now I’m curious, is there code available to make the Popular Post View widget show listings within a mileage range instead of just within the related City? Or maybe there’s another widget that would accomplish this that I’m overlooking 🙂
Thanks for all the help!
September 27, 2017 at 6:23 pm #397735I’m sorry Michael, but that would require a customization.
Thanks
September 27, 2017 at 11:13 pm #397769Using the “Near Me” widget may give you something similar, but not in a widget and not on the same page.
Thanks -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket