• Hello friends,

    I’m in the process of creating a website for a pet boarding kennel. They have 2 location, each with different facilities and services (so not exactly different “stores”, but I thought this title would capture my vision best in fewest words).

    The most obvious solution is to create a mega menu with separate parent pages for each location. However, I’m playing with the idea of displaying a “store” switcher in the header menu, that could add a variable to the urls, which I can then use to render sections conditionally for each location.

    The upside of this would be that the user only has to choose the location once, instead of navigating through a large mega menu each time (users will most times only require information about one of either location). Ideally it would even remember their set location for a couple weeks or months. Of course, the switcher would need to “remember” the setting when the user navigates the website, and refresh if the other location is selected (in order to change the url).

    Only two issues:

    • I have no idea how to build something like this (is there a plugin? I couldn’t find one…)
    • Is this even a good idea?

    Implementing the conditional logic itself should be easy enough, as my theme, Avada, has this functionality built in.

    I am curious about the thoughts of the community. Thanks in advance!

    Florence

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    Any user experience you can envision is likely possible to accomplish. It’s more of a question about how much effort it’d take to implement.

    A location switcher is a fine idea. There are lots of sites that implement something similar. If you want the selection to be remembered, it’s best to save the selection in a cookie. Then you don’t really need to add a query var to the URL since the conditional code can get the selection from the cookie.

    Depending on where in the world your site is located, you may be required to obtain consent prior to saving the selection in a cookie. There are many plugins that will help you obtain consent where necessary. Passing the selection as an URL query var is a reasonable fallback if a user should decline the use of cookies. But their choice cannot be remembered past the current session.

    It’s not too much additional effort for a conditional to check for two possible methods of passing on the selection. You should decide which method would have primacy over the other in case of a conflict.

    I think most location picker plugins are related to WooCommerce checkout, which isn’t a good fit for your particular vision. Since there are only two locations that users would toggle between, perhaps try searching for plugins that toggle content.

    This is a good reply from bcworkz. And as stated, the answer is, it depends.

    IMO, I would have the user select their preferred location from a CTA on the homepage. I doubt the Services are going to be constantly changing for each kennel, and I doubt the user will feel the need to be toggling back and forth. That said, those services may be important to the visitor, maybe more than the location.

    For example, if the visitor is looking to board in the summer, and if one location has a swimming pool, and you own a big husky – maybe the pool is more important than the location. (I’m *assuming* the locations are near-ish to each other).

    So, rather than a ‘location switcher’, this is more of a play to outline the *differences* in Services between each location, and the CTA to that location is on home. Based on your info, if it were me, I would do something like this:

    domain.com/location/one-city-name

    domain.com/location/two-city-name

    domain.com/compare-our-services

    if the content was changing constantly, I might look at it differently. But it’s good for SEO, and it’s structured logically.

    Personally, i don’t think this is that well done, but they even separate the pet-type based on location in the menu:

    https://www.eastwaypetresort.com/

    But right away they list the services based on location.

    Thread Starter Florence

    (@floortjahh)

    Thank you so much for letting me pick your brain @corrinarusso and @bcworkz !

    I am a bit further in my though process and realised I only really need the location toggle on 2 pages. So creating separate pages for each location would totally be doable (there would only be 4 pages in total). So a simple button to switch from myurl.com/location1/boarding to myurl.com/location2/boarding would totally would suffice. And it would be preferable in terms of SEO.

    However.. I would really like it if the main menu could “remember”: when clicking on Boarding (Pension in Dutch) I get the location I previously selected. Or when clicking on Day Care (Dagopvang in Dutch) I again get the location previously selected.

    On those 4 pages themselves it would be easy enough, because I can assign them a different menu navigating to the perviously selected location. But what about if I navigate there from the home page or any other post or archive page? Can you guys think of a way to achieve navigating to the correct

    I had one other idea to use a translation plugin. However… The website will need to become multilingual at some point, so this approach will probably lead to conflicts..

    Any suggestions for plugins or customization are greatly appreciated!

    Thanks,
    – Florence

    Thread Starter Florence

    (@floortjahh)

    Hmm.. Thinking I could just add the locations as a submenu and that would completely simplify and solve any issue.. I believe that is what I should do!

    Thanks for helping me think through this! If you have any other suggestions, please let me know!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Store switcher for conditional logic’ is closed to new replies.