1
Advertising System in Wordpress
Post Categories and Sub-Categories (States / Cities):
- localhost/site/cities/sp/Sorocaba (example)
Custom Post Types:
- Coupons: localhost/site/coupons/postname
- Ads: localhost/site/ads/postname
- Companies: localhost/site/companies/postname
Scenario and doubt:
- User entered the site
- User is required to choose a city and a state
- User chooses SP / Jundiaí and is redirected to: http://localhost/site/cities/sp/Sorocaba
- User views everything from page: ads, coupons, companies, Sorocaba banners.
- User click on the top menu: COUPONS
- User is redirected to http://localhost/site/coupons
Problem:
- Then the site/ system no longer knows that he was in Sorocaba.
What I needed:
If when the user selected a city, created a Session or Cookie or anything else and was "saved" for the user to enter Coupons and the wordpress query took $status $city to make the filter ai would be the ideal world!
Client does not want to lose friendly url, no get and parameters in url..
Does anyone know how to solve?
this user will be logged in to wp?
– Caio Felipe Pereira
You can create this manual Session, then in the file referring to page, you can change the parameters of the global $wp_query..
– Mateus Carvalho