Filter loop by ‘price’ with meta_query

Ok, found the problem. I had to add ‘type’ => ‘numeric’, to my query. So the final code looks like: $adsAll = array( ‘post_type’ => $postType, ‘meta_key’ => $metaKey, ‘orderby’ => $orderBy, ‘order’ => $order, ‘posts_per_page’ => $PostsPerPage, ‘meta_query’ => array( array( ‘key’ => ‘preco_anuncio’, ‘value’ => array(‘8700′,’500000’), ‘compare’ => ‘between’, ‘type’ => ‘numeric’, ), … Read more

How to hook into the subscriber /wp-admin/index.php page?

All of WP’s built-in roles have subscriber capabilities. You’re basically checking here, “if the current user has at least subscriber capabilities”. If you want to isolate only the subscribers, you can check for the absence of a higher capability. If you are just using built-in roles, the next higher role of Contributor has edit_posts and … Read more