GDV2 how to limit map to show a single place category

This topic contains 4 replies, has 2 voices, and was last updated by  Janet Slinkard 6 years, 1 month ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #466546

    Janet Slinkard
    Full Member
    Post count: 36

    I’m excited about the new release of GDV2! I recently (and meticulously) followed instructions to upgrade my site from V1 to V2. My problem is that the shortcodes I was using (to display place listings and map markers for a single category per page) are no longer working. For example: [gd_listing_map width=100% height=500px scrollwheel=false zoom=11 category=”68″] is now displaying the shortcode text on the page instead of the map. If I change it to [gd_map width=100% height=500px scrollwheel=false zoom=11 category=”68″] it shows the map but included markers from ALL categories.

    I am using Geodirectory with Divi theme. You can see what I am trying to achieve by visiting the GDV1 version of a typical page on my site at https://finditsober.com/residential-treatment/
    The GDV2 version of the same page can be seen at http://dev.finditsober.com/residential-treatment/

    Is there a list of shortcodes that work with GDV2? Please help 🙂

    #466548

    Alex Rollin
    Moderator
    Post count: 27815

    The latest version of GDV2 includes category exclusions for archive and directory maps.

    Make sure you have the latest version, open the shortcode builder, then for map type choose archive or directory to see the options.

    https://wpgeodirectory.com/docs-v2/geodirectory/design-elements/
    https://wpgeodirectory.com/docs-v2/geodirectory/personalize/

    #466554

    Janet Slinkard
    Full Member
    Post count: 36

    Thank you! I believe I’ve got it. 🙂
    Now I want to customize the appearance of the listings in grid view 1/5
    Can you tell me exactly “where” to add this filter code?

    add_filter(‘geodir_cf_address_template’,’_my_new_address_format’);
    function _my_new_address_format($format){
    global $post;

    if($post->post_type==’gd_place’){
    $format = “%%street_br%% %%city_br%% %%zip_br%%”;
    }

    return $format;
    }

    #466555

    Alex Rollin
    Moderator
    Post count: 27815
    #466805

    Janet Slinkard
    Full Member
    Post count: 36

    I tried it, but it conflicted with with either my theme or OIO Publisher (both are vital). I ended up just adding it to my clhild theme functions.php file.

Viewing 5 posts - 1 through 5 (of 5 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