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

Second wp_query doesn’t appear to be working

Because you’re calling get_post_permalink etc, I think you may need to add wp_reset_postdata(); as well, per this section in the codex: http://codex.wordpress.org/Class_Reference/WP_Query#Interacting_with_WP_Query Hope this helps, best of luck!

query_posts, oderby meta_value & print “future” posts

I would suggest storing the date-times as either: Timestamp (to sort/compare by meta_value_num) ‘yyyy-mm-dd hh:mm (e.g. 2012-04-11 19:37) to sort/compare by meta_value Then the following will work (assuming you’re using timestamp): $now = current_time(‘timestamp’); $args = array( ‘post_type’ => ‘rides’, ‘posts_per_page’ => 3, ‘meta_query’ => array( array( ‘key’ => ‘date’, ‘value’ => $now, ‘compare’ => … Read more

query inside main query order issue

the_title(), the_excerpt() and the_permalink() prints the output at once but the shortcode function is supposed to just return the output. You can use get_the_title(), get_permalink() and get_the_excerpt() instead.

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