Two issues here
-
The default
pagepost type ispage, notpages -
Your
meta_queryis 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
- Matching Serialized Arrays with meta_query
- 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]
- Slow meta query with multi meta keys
- Using OR in WP_Query negates the “NOT EXISTS” compare
- 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
- WP_Query display next custom post from today’s date
- WP_Meta_Query causing long-running MySQL queries
- Duplicate posts being displayed when querying Custom Fields
- Loop to display random posts only if a custom field matches category
- get_posts that match a user-specified value on a page
- How make a custom search on backend in WordPress without plugin?
- How to add a new meta key and assign timestamp to posts
- How to Display pages with a Custom Fields in one page
- Get content from pages with same meta_key from Database
- Limit the number of acf content when displaying in post loop [closed]
- How do I have WP_Query match posts based on search parameter OR meta fields? (rather than search parameters AND meta fields)?
- Advanced Custom Fields dynamic update_field
- Alter main archive, to show posts with meta as last
- Change the main loop WordPress impact on the server?
- Meta Query returns wrong number of posts
- custom-meta-box checkboxes from loop won’t save
- How to show a post if was published less than two hours ago?
- Change order of posts
- Meta Query And/Or
- Meta query with multiple custom fields for archives page ordering problem
- filter custom field values $min $max
- Custom Fields – How to create a list from multi-line entries of a single value
- Get Data From wp_sitemeta for Multisite network
- Unique meta_key with array value vs repeated meta_key with single values
- how to make nsfw post with thumbanil
- Custom Query based on custom field of a single post
- Efficiently sort only certain categories by custom field
- How can I do a variable for meta_query?
- Can I access a post meta field before the loop?
- Displaying page image in the footer automatically
- Avoiding ACF get_field and returning to core WordPress function
- ORDER BY custom field value out of where clause
- comment meta_query for keys that aren’t yet set
- Show image if author meta (profile fields) exists outside loop
- Can’t query by meta_key
- How can I use custom properties to set different background on different pages?
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- change order of images attached to post
- Diamond question mark in text after migrating content
- ul list with only as many li’s as filled custom fields
- 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
- Collect Data from NEXT item while in loop
- 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
- Filter or order based on custom field
- Need to search a custom field (ingredients, one long string per post), but want it to allow phrases/non-exact matches
- 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
- User Filter Options on Archive Page
- Query multiple meta values at the same time :
- Custom meta boxes – add php code inside?
- get wordpress post loop by meta box date
- Load one page with parent and child pages
- Counting number of images from loop
- Metabox value for post loop?
- meta_query ‘compare’ => ‘!=’ not working
- Create custom query for search?
- Filter query based on date in custom field
- Why is wp_list_pages altering $post->ID of the page?
- How to use page metadata while using wp_list_pages()?
- Getting content from custom fields of different pages on a single page
- Decouple page name from page title
- Checking if field is set before comparing with meta_query in query_posts?
- 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
- Filter Query Post by Custom Fields(by date)
- Custom field not showing
- Sort posts based on an acf field called fecha value return longtext ‘20240517’
- Query ‘orderby’ when there are multiple values for the same meta_key