Two issues here
-
The default
page
post type ispage
, notpages
-
Your
meta_query
is wrong, it should be an array of an array, not just an array
Your arguments should be
$args = array(
'post_type' => 'page',
'order' => 'ASC',
'posts_per_page' => 50,
'meta_query' => array(
array(
'key' => 'field_5505a81b83234', // field key generated from acf plugin
'value' => 'Yes'
),
),
);
Related Posts:
- Loop through two different sets of custom fields
- Calling custom fields for pages (not posts)
- Interrogate a page within a loop to check template type or custom meta data (Pages vs Posts)
- How do delete a meta key?
- Using meta query (‘meta_query’) with a search query (‘s’)
- How to enable custom fields for pages (if not a bad practice)?
- ORDER BY custom field value
- Can I query custom meta data through WP_Query
- Add custom fields to search
- SELECT max(meta_value) FROM wp_postmeta WHERE meta_key=’price’… stops working when value is over 999
- How to add add_meta_box to specific Page Template?
- Matching Serialized Arrays with meta_query
- Meta Query with AND & OR?
- Having different sidebar content for MANY pages?
- Trying to perform complex custom field query with order by set to field value
- Is there a way to do multiple ordering on a multiple meta_query?
- Order posts by custom field and if custom field is empty return remaining posts
- WordPress Search Custom Meta Field Only
- Custom Page Template [closed]
- Compare meta_query decimals not working right
- Ordering posts by anniversary using only day and month
- Slow meta query with multi meta keys
- Add input field to ‘Pages > Edit Page’ through functions.php
- Using OR in WP_Query negates the “NOT EXISTS” compare
- How can I query on the year part of a complete date in a custom field?
- How can I combine meta_query queries?
- Displaying posts with only upcoming dates according their custom field date value
- Difference between ‘LIKE’ and ‘IN’ in meta queries
- Sorting posts by multiple values, combined
- meta_value_num sort glitch
- WP_Query display next custom post from today’s date
- Loop through incrementing custom fields
- Price comparison table based on Custom Post Type?
- do_shortcode close
- Search Results Page – Displaying Custom Meta Fields
- tax query between operator like
- Display a different image for each page with editor
- Collect Data from NEXT item while in loop
- Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?
- How to show content of custom fields in search results?
- Custom field outside the loop and inside an array
- Is it possible to compare the current time with a custom “start” and “end date
- Display metabox title for custom fields with values
- use custom field value as post category in loop
- How can I modify my meta_query to work with prices that are stored in the database that contain dollar signs and commas?
- Filter or order based on custom field
- Display the output from Custom User Fields from a WordPress user profile on a WordPress Custom Page
- Need to search a custom field (ingredients, one long string per post), but want it to allow phrases/non-exact matches
- Compare ACF date field (if exists) and post date and order DESC
- What am I missing in this Code Block?
- Making WP_Query limit results by date before today where date is a meta_query
- multiple meta_query and orderby question
- get_field values for each post on home page using wp_add_inline_style
- get posts based on non-single metadata
- Woocommerce products search with custom fields
- How to save multiple values with same meta_key, each value linked to another tag id
- How to improve my non-unique metadata MySQL entries?
- WP meta_query args not working in function
- Filtering posts by ACF meta query
- Why does my numeric meta query work only on one meta key and not the other?
- meta_query to check all custom fields
- User Filter Options on Archive Page
- Query multiple meta values at the same time :
- Sort loop by custom field from different post type
- Custom meta boxes – add php code inside?
- Create Shortcode shows only posts with custom_field meta
- get wordpress post loop by meta box date
- Outputting custom field on home.php not outside of blog list
- Load one page with parent and child pages
- Counting number of images from loop
- Page template is missing fields or is invalid when I updating the template
- Metabox value for post loop?
- meta_query ‘compare’ => ‘!=’ not working
- Get meta value when the page is a blog archive
- Create custom query for search?
- Filter query based on date in custom field
- Why is wp_list_pages altering $post->ID of the page?
- WP_query returns error when used for custom widget
- Custom Field select list is truncated
- Query Posts Via WordPress URL
- How to use page metadata while using wp_list_pages()?
- Getting content from custom fields of different pages on a single page
- Meta_query not filtering posts
- Decouple page name from page title
- Checking if field is set before comparing with meta_query in query_posts?
- I want my post to republish again after adding a custom field
- loop through custom post-type with two meta_keys
- Display posts where date field matches current month?
- Filtering posts by WORD in custom field
- Retrieve IDs from custom field, count and display results differently according to count
- Pagination not displaying correct number of pages
- Display custom field outside the loop
- Filter Query Post by Custom Fields(by date)
- Custom field not showing
- Order by a meta field in query loop
- Dynamic background image used in css after selector
- WP Query Args – search by meta_key or title
- get_the_ID() retrieves same ID on Gutenberg’s Query Loop
- SQL query based on two different custom field values
- Sort posts based on an acf field called fecha value return longtext ‘20240517’