Managed to solve my issue. I was missing the meta_key
param in the args of my query_posts
function.
Here it is with the fixed version :
$args = array(
'post_type' => 'property',
'posts_per_page' => 20,
'meta_key' => 'my_meta_key',
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1)
);
Related Posts:
- Use REGEXP in WP_Query meta_query key
- Get posts by menu ID
- How to implement time filter to show random post 1 month for one category and 3 months for other categories
- Order by custom table and multiplication
- Bypass “supress_filters” in WP Query
- Add class to first post in custom loop using post_class filter
- Filter Custom Taxonomy Posts
- Filter post query to only show direct children of category
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- filter posts by meta key with pagination
- query post based on comparison
- When should you use WP_Query vs query_posts() vs get_posts()?
- When to use WP_query(), query_posts() and pre_get_posts
- Get post ids from WP_Query?
- Nested meta_query with multiple relation keys
- Some doubts about how the main query and the custom query works in this custom theme?
- Wp get all the sub pages of the parent using wp query
- Return only Count from a wp_query request?
- How to query for most viewed posts and show top 5
- WP Query where title begins with a specific letter
- WP_Query vs get_posts
- Order by DESC, ASC in custom WP_Query
- How to prevent execution of default query, while preserving ability to use WP_Query in template?
- How to list some posts first in the loop based on post id
- Whats the difference between post_limits and pre_get_posts?
- How to add taxonomy filter on the query fly?
- Using OR conditions in meta_query for query_posts argument
- Query Posts in a Predefined Order
- WP_Query – filter or directly?
- Order posts by ID in the given order
- What is the most efficient way of querying posts based on visits and date for current day?
- Query Multiple Post types each with own meta query
- Get the number of posts from the current page results
- Changing Posts Per Page and offset with pre_get_posts
- ajax category filter
- WordPress Custom Query to show posts from last x years
- How to order posts tag by tag?
- Overriding The Loop with filter or hook
- Slow SQL_CALC_FOUND_ROWS Query
- Query Custom Meta Value with Increment
- Custom query incorrectly returning everything [closed]
- WP Rest API v2 return posts with specific tag
- How to know which one is the main query?
- Get posts by meta data OR title
- How to filter sql only for a specific post type
- Perform query with meta_value date
- Using is_main_query to select custom post type on certain page
- WP_Query ordered by custom field that is a date string?
- get query’s query string
- Meta Query with date and time on the same Day before given time
- Ignore a filter on the media library
- get_the_title($postID) OR get_the_title()?
- Display Posts by modifying the where clause only for my query
- How to support multiple search terms query within one process?
- SQL query equivalent to WP User Query
- How do I create my own nested meta_query using posts_where / posts_join?
- What’s wrong with this WP query?
- Stop all SQL_CALC_FOUND_ROWS wordpress queries
- How to count post meta key values for all posts in database
- How to use filter hook posts_join for querying taxonomy terms in posts_where?
- Best practice for multiple queries on page
- Group posts by meta_key
- How to Get All Posts but the Private ones?
- How to search for posts IN OR title OR content OR author?
- How to get any tag ID
- WP_Query hit max joins… How else can I build a search function that uses custom fields?
- Would this post meta be better added to the post table rather than post_meta table
- How to query ‘posts_per_page’ to display a different blog posts index template?
- How to find out what “Blog pages show at most” is set to [duplicate]
- Order By Multiple Meta Fields
- meta_query on a date range using an array of values
- Which filter/action hook gets triggered after a query has been performed?
- Multiple search queries on one page
- How to show only one post for each categories of taxonomy of custom post that contains a specific custom field
- How to speed up wp_query, took more 5s to run against 100k posts
- Pass the same object to multiple widgets in a template with one query
- Retrieve or Query Pages by ID
- SQL User Query by Multiple Roles using PHP
- Remove ellipsis from the excerpt retrieved using get_the_excerpt()
- Removing posts from the returned wp_query. Cannot use object of type WP_Query as array
- WP query exclude post within the last month / only show over 1 month old
- WordPress query for most recent posts from multiple categories
- WordPress Query is taking more then 20 second and stuck on creating index
- How do you query wordpress posts using a math formula between multiple meta field values?
- How add a custom posttype name using ACF field to a query post array
- Too many posts cause slow load when paginating
- What’s the point of the query_vars filter?
- Get the Plugin Which Triggered a MySql Query in WordPress?
- Page navigation doesn’t show when query category
- Multiple instances of Featured Image Query
- Refine/Filter WP_Query Posts with jQuery or Ajax
- Use ‘parse_query’ filter to show posts that from multiple criteria
- How can I pick a single post from the latest 3?
- 2 loops on page – one with orderby rand second orderby date
- How do you Query posts with nothing in common?
- Query post with meta_query where date is not in future
- Next/Prev posts on same page
- How to apply filter inside a single wp_query?
- What is considered a default query for the request filter?
- Mysql query LIKE not working