Wordpress - Custom Post Types URL

Asked

Viewed 149 times

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:

  1. User entered the site
  2. User is required to choose a city and a state
  3. User chooses SP / Jundiaí and is redirected to: http://localhost/site/cities/sp/Sorocaba
  4. User views everything from page: ads, coupons, companies, Sorocaba banners.
  5. User click on the top menu: COUPONS
  6. User is redirected to http://localhost/site/coupons

Problem:

  1. 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?

  • You can create this manual Session, then in the file referring to page, you can change the parameters of the global $wp_query..

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.