Trying to use categories in new [gd_listing_map] shortcode…

This topic contains 18 replies, has 4 voices, and was last updated by  Kory 7 years, 2 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #366024

    Kory
    Expired Member
    Post count: 79

    Hi, All. I’m trying to use specific categories within the new [gd_listing_map] shortcode which is supposed to feature them based on the latest version as indicated here:

    https://wpgeodirectory.com/support/topic/full-featured-maps-on-sub-pages-multi-level-filters/#post-345585

    The map comes up, however, there aren’t any listings in the two or three categories IDs I’ve included. Does it matter if the categories are from different CPTs? I’ve also tried including just one category ID and still no listings. Here’s a sample:

    [gd_listing_map width=100% height=300 scrollwheel=false category="222,211"]

    I confirmed I’m running version 1.6.17 so it should work based on the documentation, correct?

    https://wpgeodirectory.com/docs/core-shortcodes/#listing

    Thanks much, in advance, for any insight you might offer.

    Regards,
    Kory

    #366043

    Kory
    Expired Member
    Post count: 79

    Hi again, All. I tried updating GeoDirectory on my DEV server as suggested here:

    https://wpgeodirectory.com/support/topic/listings-page-map-not-showing-selected-cpt/#post-361810

    Unfortunately, I’m still not seeing listings on the map when using two category ID’s in the shortcode. If you have any other suggestions, I’d appreciate hearing them.

    Thanks much.

    Regards,
    Kory

    #366066

    Kor
    Moderator
    Post count: 16516

    Hi Kory,

    Yes, that shortcode works on the latest version and I’ve also tested it. Did you assign the correct CPT? The default points to gd_places. If it doesn’t work still, please share WP temp admin access to your site so we can take a better look. You can post the details here using the private reply option below.

    Thanks!

    #366099

    Kory
    Expired Member
    Post count: 79
    This reply has been marked as private.
    #366168

    Paolo
    Site Admin
    Post count: 31206

    Hi Kory,

    there was a bug in the latest version with this shortcode that would allow only the default CPT to be used.

    Please see: https://wpgeodirectory.com/support/topic/listing-map-not-showing-by-custom-post-type/#post-364043

    Thanks

    #366184

    Kory
    Expired Member
    Post count: 79

    Hi, Paolo. Thanks for replying. I tried replacing the geodirectory_shortcodes.php file with the one referenced in the GitHub repository. I then tried running the following shortcode using different categories in one CPT (which I’d prefer not to do):

    [gd_listing_map width=100% height=300 scrollwheel=false category="222,437" post_type=gd_brewery]

    Unfortunately, I’m still seeing a blank map which I’ve attached.

    I also tried using just categories across different CPTs such as this which are two categories in two different CPTs (this is my preference):

    [gd_listing_map width=100% height=300 scrollwheel=false category="222,211"]

    I’m getting the same results from this map as well, e.g. blank map.

    Do you have any other suggestions I can try?

    Thanks again.

    Regards,
    Kory

    #366188

    Paolo
    Site Admin
    Post count: 31206

    I asked to a developer to check your website. he’ll let us know asap.

    Thanks for your patience,

    #366191

    Kory
    Expired Member
    Post count: 79

    Thanks, Paolo! FYI, I updated the file on my DEV server, in case your developer needs that info. I’ve previously provided those credentials as well.

    Regards,
    Kory

    #366288

    Kiran
    Moderator
    Post count: 7069

    Hi Kory,

    On your DEV site “Sandbox – Testing” page the map working fine, the problem was categories icons are missing for categories, so map does not showing markers on map.

    Check on your DEV site after setting 222,223 categories in shortcode, the markers are back on map now.

    So on you production site you first need to update this patch https://wpgeodirectory.com/support/topic/listing-map-not-showing-by-custom-post-type/#post-364043
    and then have to set correct icon for categories which ahs missing icons.

    Thanks,
    Kiran

    #366407

    Kory
    Expired Member
    Post count: 79

    Thanks for your reply, Kiran. Yes, I see what you mean about the category icons missing. I was able to assign them to the categories again.

    Just to make sure I understand, I’ve tested using the following shortcode:

    [gd_listing_map width=100% height=300 scrollwheel=false autozoom=true category="529,531" post_type=gd_region_blue_ridge]

    I see the single listing in the “Bars” category as well as the other listings from the “Breweries” category. This is obviously set to the gd_region_blue_ridge CPT. What I would prefer to do is keep all the CPTs by organization type, the way they currently are and use a single map across CPTs such as:

    Menu points to region, e.g. Central VA to include the following:
    ——-Breweries – link points to the Central VA subcategory in the Breweries CPT
    ——-Cideries – link points to the Central VA subcategory in the Cideries CPT
    ——-etc.

    I would like to link the top level page above, e.g. the Central VA page to use the [gd_listing_map] shortcode for all subcategories for the respective region such as:

    [gd_listing_map width=100% height=300 scrollwheel=false autozoom=true category="349,222"

    The shortcode above crosses various CPTs. The category IDs referenced are from, for example:

    –Breweries CPT – Central VA subcategory
    –Cidery CPT – Central VA subcategory
    –etc…..

    Can you please tell me if it’s possible to set up the shortcode this way or would I need to create region-specific CPTs and place the organization types within each CPT? For example

    –Blue Ridge CPT
    —–Brewery subcategory
    —–Cidery subcategory
    —–etc…..
    –Central VA CPT
    —–Brewery subcategory
    —–Cidery subcategory
    —–etc…..
    –etc… CPT
    —–etc. subcategories

    If I need to create regional CPTs, I’ll lose custom field capabilities, e.g. hotels have their own custom fields, breweries have their own custom fields, etc. I’ll also have a bunch of 404’s unless I painfully set up 301 redirects.

    I hope this makes sense. I’d appreciate any advice you might offer.

    Cheers!

    – Kory

    #366409

    Paolo
    Site Admin
    Post count: 31206

    If the shortcode is used in a non GD page, you won’t be able to filter the map by location.

    However I’m not entirely sure I understand what you are trying to do, that can’t be done using regular GD pages and map widgets.

    Let us know,

    Thanks

    #366411

    Kory
    Expired Member
    Post count: 79

    Thanks for sticking with me, Paolo. 🙂 I know this is a strange one. Let me see if I can try to explain better.

    Currently, my website is using organization types as the CPTs in the menu which I’ve attached (menu.jpg).

    You can also see the organization type CPTs in the cpts.jpg image. I had also created regional type CPTs, e.g. Blue Ridge, Central VA, etc., also shown in the cpts.jpg image.

    What I would like to do is replace the menu at the top with regional links, e.g. Blue Ridge, Central VA, etc. and use the organization types as the subcategories.

    The issue is that my site is currently reversed: organization types are the CPTs and then broken down by region within them.

    If I switch to regional CPTs and break down by organization types within them, that’ll require a complete GeoDirectory reorganization. I’ll also lose the capability to have organization type-specific custom fields in regional CPTs.

    That being said, my question is this:

    Is it possible to continue using the organization type CPTs but have my menu pointing to regional links? If so, I’d like to use the listing map shortcode on a page for each regional link which would include categories from the organization type CPTs such as:

    —Central VA
    —–Breweries
    —–Cideries
    —–etc.

    I hope this makes sense.

    Thanks so much for sticking with me!

    Regards,
    Kory

    #366414

    Kory
    Expired Member
    Post count: 79

    I should probably ask the ultimate question:

    Is it possible to combine different CPTs categories into the [gd_listing_map] shortcode? For example, if category IDs 221,455,245,etc. span several CPTs, will all those category icons display on the map if I don’t include the post_type variable?

    Regards,
    Kory

    #366416

    Paolo
    Site Admin
    Post count: 31206

    It is not.

    Thanks

    #366439

    Kory
    Expired Member
    Post count: 79

    Okay, thanks, Paolo. Looks like I’ll perform a total reorganization. Thanks, again, for your continued patience.

    Regards,
    Kory

Viewing 15 posts - 1 through 15 (of 19 total)

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

Open Support Ticket