title: how to change the site to particular location in wordpress
body: <p>For example,</p>
  
  <p>I have a domain.com. If the user searches domain.com/toronto. I need the complete site should show the posts and article related to that city.</p>
  
  <p>so I planned to do </p>
  
  <p>take city(toronto) from search query</p>
  
  <p>1.search with the geolocation api if it is valid place, 
  2.get the lat long, 
  3.fix it in cookie, until another search is done to update.</p>
  
  <p>I used <code>pre_get_posts</code> and <code>parse_query</code> to get the city. but I did not get nothing, please someone suggest which hooks to use and need to understand the wordpress hooks and filters quickly.</p>