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

Print post category name from a custom post type wordpress

You shouldn’t use the flush_rewrite_rules function like that read the docs https://codex.wordpress.org/Function_Reference/flush_rewrite_rules#Usage In the param “template” you have an error: <?php the_taxonomies(array(‘template’ => ‘% %l’)); ?> <?php the_taxonomies(array(‘template’ => ‘%s %l’)); ?> If you are using the default value just call the function without any params Edit: I use this code when I want just … Read more