Skip Navigation

[Resolved] Select city via cookie

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 2 voices.

Last updated by Shane 7 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#555666

Hi, i would like to create a portal about new years eve in italy.

Each city should have their own content. How can i implement this in toolset? I think i should use cookies or can you help me to find a good solution ?

#555692

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alessandro,

Thank you for contacting our support forum.

Actually what I see that you want to achieve is to pre-filter the results based on the user's city correct?

This isn't possible even with Cookies since Toolset gets its values from the URL to filter the view.

What I would suggest doing is to use some plugin that can redirect based on the user's Location and then just have some prefiltered view setup for each page.

Thanks,
Shane

#555922

I think it is not a good solution.

I need users could set the city via a select, or eventutally via a plugin. Once setted the city what should i do ?

#556126

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alessandro,

Where would the user select their city on the view ? If its on the view then the filter will already begin and the appropriate results will start to display.

I'm not 100% sure what you mean so please let me know.

Thanks,
Shane

#556160

The website's urls should be something like this

hidden link
hidden link
hidden link

Each city has his own content. It is not important where the user choose the city

#556249

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alessandro,

Ok so each of these pages you can create 3 different views and place them on each page . These views will already be prefiltered with the content for each city.

Since you're saying that where they choose the city or how they choose doesn't matter then you can just ensure that when they choose a city it links to one of these pages.

You can also have a look at the link below.
https://toolset.com/documentation/user-guides/front-page-filters/

Thanks,
Shane