Query_vars not working for me

My issue was with nginx, specifically: location / { index index.php index.html; try_files $uri $uri/ /index.php; } Which I changed try_files $uri $uri/ /index.php; to try_files $uri $uri/ /index.php?$args; as outlined here which also fixed another issue that I was having with URL parameters.

My class function is not seeing GET url paramaters

As I said, I was just missing the declaration to use the global $wp_query, so it wasn’t accessing my filters. Here’s what worked incase it helps: global $wp_query; // pull variable from url if (isset($wp_query->query_vars[‘country’])) { $this->user_country = $wp_query->query_vars[‘country’]; } else { $this->user_country = ‘your country’; } if (isset($wp_query->query_vars[‘lat’])) { $this->user_lat = $wp_query->query_vars[‘lat’]; } else … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)