Map and menu

This topic contains 14 replies, has 2 voices, and was last updated by  Alex Rollin 6 years, 5 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #453791

    Joe Bjorklund
    Expired Member
    Post count: 163

    Hello
    I have an odd problem. My directory is broken down by state and I have a top level menu for the states that we represent. If I click on a menu item, it goes to that category page perfectly. When I click on one of the listings, it goes to that listing and everything looks great. The problem is that if I go back to the menu from there and select another state, it remembers the city of the prior listing and then shows zero results. Example: Click on Texas to get the listings there. Click on one that is in Dallas and it looks great. Then if you click on California in the menu, it says ALL CALIFORNIA (Category) in Dallas which then of course shows no results. Thanks for the help with this. Have a good day

    #453800

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    are you using categories as locations?

    GeoDirectory creates locations for each listing, and then automatically creates pages for each location that list all listings in that location.

    If you are linking to categories, then you aren’t linking to location pages.

    We can take a look and see how you have it set up, just make a private reply and include your WP Admin credentials.

    If you just want to remove the location from the categories to show everything/all the listings with a category, try adding this snippet with the code snippets plugin:

    
    
    
    remove_filter('term_link', 'geodir_get_term_link', 10);
    
    
    #453810

    Joe Bjorklund
    Expired Member
    Post count: 163

    Thank you, I will send the login credentials. The goal is to have the different states in a drop down and when you click on the state, all the listings for that state show up. Then if you go back to the menu to select a different state, have it just display the listings in that state without adding the location of the prior listing. You will see it in the menu. Sending now

    #453811

    Joe Bjorklund
    Expired Member
    Post count: 163
    This reply has been marked as private.
    #453816

    Alex Rollin
    Moderator
    Post count: 27815

    The goal is to have the different states in a drop down and when you click on the state, all the listings for that state show up.

    That is what the Location Switcher is for:

    You can place it in the menu at :

    GeoDirectory – Multilocations – Show location switcher in menu

    There is also a shortcode and widget:

    https://wpgeodirectory.com/docs/location-manager-shortcodes/

    #453817

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #453819

    Alex Rollin
    Moderator
    Post count: 27815

    You can change the term “Region” to state using translation:

    https://wpgeodirectory.com/docs/translate-core/

    You will need to translate core and the Location Manager Addons

    https://wpgeodirectory.com/docs-v2/translation/overview/

    #453857

    Joe Bjorklund
    Expired Member
    Post count: 163

    Thank you Alex
    So to confirm, there is no way to use the menu in the way that I have it set up? Since this is a retail site with GD in the background, I want to avoid the switch location feature. Is there any way to drop off the location tag when they jump from category to category? I do not need a lot of listings in each state so can you think of any work around that would make this work? I am willing to change the structure in any way that works with the main goal of using the main menu without the location changer. I use the changer on my other sites but they are directory sites first and this is a directory add on. I hope this makes sense 🙂

    #453901

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    If you just want to remove the location from the categories to show everything/all the listings with a category, try adding this snippet with the code snippets plugin:

    
    
    
    remove_filter('term_link', 'geodir_get_term_link', 10);
    

    GeoDirectory is designed to make use of the location pages. When a user lands on a location page, that location is ‘set’ for the user and taxonomy links are changed to use that location. The snippet disables that changing of taxonomy links.

    The category pages, like “State Surf” do not function the same as location pages. I would recommend you try to use the location pages for the states and provide links to those instead of categories.

    #453951

    Joe Bjorklund
    Expired Member
    Post count: 163

    Thank you Alex
    I will give that a try.

    #454619

    Joe Bjorklund
    Expired Member
    Post count: 163

    Hello Alex
    I loaded that snippet in the scripts and it still takes me to the city that I last visited. My goal is to have a user pick a category and then see all of the listings in that category. After they pick a specific listing to look over, I want them to be able to click on a popular category and have them see every listing in that category regardless of location. Is that what that snippet is supposed to accomplish?

    Thank you for your help

    #454620

    Joe Bjorklund
    Expired Member
    Post count: 163
    This reply has been marked as private.
    #454621

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #454629

    Joe Bjorklund
    Expired Member
    Post count: 163

    Do you need my log in information?

    #454696

    Alex Rollin
    Moderator
    Post count: 27815

    Code snippets can be added with the Code snippets plugin: https://wpgeodirectory.com/docs/useful-plugins/#snippets

    I removed the snippet from the Custom CSS entry.

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