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()?
- Get post ids from WP_Query?
- Some doubts about how the main query and the custom query works in this custom theme?
- How to query for most viewed posts and show top 5
- How to list some posts first in the loop based on post id
- 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
- WP Rest API v2 return posts with specific tag
- Perform query with meta_value date
- get_the_title($postID) OR get_the_title()?
- How to support multiple search terms query within one process?
- How do I create my own nested meta_query using posts_where / posts_join?
- Best practice for multiple queries on page
- How to search for posts IN OR title OR content OR author?
- How to get any tag ID
- How to find out what “Blog pages show at most” is set to [duplicate]
- Retrieve or Query Pages by ID
- SQL User Query by Multiple Roles using PHP
- WordPress Query is taking more then 20 second and stuck on creating index
- What’s the point of the query_vars filter?
- Get the Plugin Which Triggered a MySql Query in WordPress?
- Multiple instances of Featured Image Query
- Refine/Filter WP_Query Posts with jQuery or Ajax
- How do you Query posts with nothing in common?
- How to apply filter inside a single wp_query?
- When to add_filter() to Custom Query
- Custom category search box for WordPress
- Order a query result by a numeric meta key even if it does not exist, but put the posts with meta key first
- Single meta_query query using OR instead of AND in request’s WHERE statement
- How to use filter hook “the_posts” with a function that refers to $this?
- Store sticky post’s ids in a transient
- How to use MySQL’s MATCH AGAINST in WP_Query?
- query_vars filter not working even though query string parameter is present
- Slow WP_Query for custom post type
- How to build a WP_Query using mulitple tags and using AND or OR operator between them
- Multiple loops without repeating content
- Add “Category” to Mysql Query
- Mysql query and order meta value
- Help with WP_Query – Too many mySQL queries
- How can I filter by slug depending on language selection
- Using hook to use DISTINCT in a wp_query
- WP_Query with different postmeta filter for each categories
- Wp query show post by author name or post title or post content
- Display custom tags on pages that have a specific page parent
- Slow WP_Query with ‘OR’ on meta_query
- How to filter a query by date in a shortcode?
- How to query for all posts that have a particular meta key?
- How can I override one post and make it display content for another post?
- Get all posts which was posted on X Days WordPress
- Meta Query doesn’t works as espected
- Conditional operator OR not working with custom fields
- Get posts that do not have the same tags as current
- Should I reset $wp_query?
- Posts query according to meta box date
- How to use ‘WP_Query’ or ‘query_posts’ to display content in a descending order
- Filtering by multiple conditions in the loop
- Max Posts and Memory Limit
- Query multiple meta key values for template
- Magazine style frontpage with multiple categories/loops and no duplicate posts
- Query post and sort by custom value calculated with custom field on cpt
- Display posts ONLY from the current logged in user and current week/year/month Elementor posts
- Custom meta_query order for Elementor based on post meta key [closed]
- query hook parse_tax_query function takes no effect
- ElasticPress is (aparently) messing with my search filters
- INNER JOIN custom tables – SQL Query
- One of two similar WP Query is very slow
- Order by meta date with a thousanth of a second defaults to post order
- Problem with my loops
- Multiple wpostmeta.meta_key
- get term objects and post objects in query
- My entry results are not consistently alphabetized
- How to order posts, that have already been filtered by custom taxonomy, by their category names?
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- Issue generating custom filter for cpt admin columns
- Modify query to exclude certain ids and certain parents and its corresponding children
- How to order by datediff in WP loop?
- How to count post meta key values for all posts in database
- Parsing External Table Arguments
- Exclude categories and subcategories in QueryLoop
- How to add a custom field and incrementing value for all the published posts
- Incorrect posts displayed on category page
- List categories using WP_Query
- WP Query – Show custom posts only if user contain some user meta
- Show number of posts AND number on current page (cannot make it work)
- Bulk delete comments, foreach loop
- new WP_Query with order args – no more distinction between categories