The get_pages function is rather old and really shouldn’t be used anymore. Use a get_posts instead (a Page is just a special type of Post):
$listingPages = get_posts(
array(
'meta_key' => 'streetAdd',
'post_type' => 'page',
'post_status' => 'publish',
'orderby' => 'meta_value',
'order' => 'ASC',
)
);
Related Posts:
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Sort alphabetically by custom field
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Max length of meta_value
- Orderby meta_value only returns posts that have existing meta_key
- ORDER BY custom field value
- SELECT max(meta_value) FROM wp_postmeta WHERE meta_key=’price’… stops working when value is over 999
- Auto sort the wp-admin post list by a meta key
- How can I display all values of a custom field from posts with a certain value of another custom field or from certain post types?
- Archive sorting functions by custom fields (front-end)
- Order by custom field date?
- Assign/update the custom field value for all posts
- Order by custom field date with ASC order
- How to break meta values into different items and avoid duplicates?
- How can I sort get_users() by any value (last_name, user defined fields and more)
- WP_query : meta_key with custom rule for specific value
- Is it possible to order posts by two meta values?
- Sorting posts by multiple values, combined
- Sort by posts that have a featured image?
- How to sort category by custom field value
- trim custom field text value and show (…)
- sort search results by custom fields using dropdown
- Query post order by post and desc not working
- Sorting posts ordered by custom field value
- Sorting WordPress Posts via Custom Field Values?
- How to wrap meta values seperated by comma in ? [closed]
- How to create a Custom Meta Box with Name/Value Admin User Input Fields?
- Run a check for multiple meta key values
- Filter by custom field (meta_key) using JSON API
- Advanced search by two criteria – sort by location and date (ascending or descending)
- Removing link ” from ” on meta_value in custom feilds
- Change the sort order for posts to include custom field
- Sort custom post type by multiple custom fields
- Trying to sort and display categories(not posts) by custom field: ‘order’
- Sort WP_Query with numeric custom field
- pre_get_posts : only get posts by wp_usermeta value
- ORDER BY custom field value out of where clause
- wordpress custom loop ascending descending posts by custom field
- meta_value and meta_key filtering returning no posts [closed]
- IF Custom field value equals ZERO
- Select custom posts by meta_value and sort by a different meta value
- List custom field values in alphabetical order without repetition
- How to update a custom field in all posts with the value of another custom field in the same post?
- Update post meta custom field using block editor
- How to add custom filed value after in wp post title
- change order of images attached to post
- Sortable Custom Columns not sorting correct
- Sort posts by clicks on download button
- query_posts with meta_value
- How To Show Get Adjacent Posts If Posts Are Sorted By Custom Field
- Listing the most popular 8 city (custom fields) as used in posts
- How to sort by custom field value?
- Show array of meta_value in Edit Post Coloum
- Custom Query Fields – Altering Meta Value
- How to order posts by number of Vimeo Likes
- Filter or order based on custom field
- Compare ACF date field (if exists) and post date and order DESC
- Making WP_Query limit results by date before today where date is a meta_query
- User query – getting values for custom meta keys/fields
- get posts based on non-single metadata
- Set class if a meta value is set within post archive
- Create Shortcode shows only posts with custom_field meta
- Sort posts by custom fields with empty values
- 4 Unique Random Posts based on Custom Field Values
- Sort custom fields in admin by last field added
- Custom Field: Display only if a specific key is selected outside the loop
- list pages by custom_field?
- Sort posts after filtering them through multiple taxonomies
- Can’t sort custom column on user.php by number / meta_value_num?
- Order by a meta field in query loop
- WP Query Args – search by meta_key or title
- Saving multiple custom meta box fields
- get Custom field label (select/dropdown) on front end
- Can I count every article following extracted meta value?
- Best Practice for storing aggregate data by date or other criteria?
- SQL query based on two different custom field values
- Block Editor – Meta values not saved, meta changes to empty array on update
- Sort posts by numeric value of custom field, and also show any other posts without that custom field
- Sort posts by numeric value of custom field, and also show any other posts without that custom field
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- WP_Query – Order results by meta value
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- getting all values for a custom field key (cross-post)
- How to add a custom field in the advanced menu properties?
- Custom query with orderby meta_value of custom field
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- Using meta query (‘meta_query’) with a search query (‘s’)
- Can I exclude a post by meta key using pre_get_posts function?
- Add validation and error handling when saving custom fields?
- Show Custom Fields in Quick Edit
- Where are custom field values stored in the database
- Validating Custom Meta Box Values & Required Fields
- How do I set the default admin sort order for a custom post type to a custom column?
- Add custom fields to wp native gallery settings
- How to fix missing custom fields after upgrading to WordPress 4.8.1?
- How to enable custom fields for pages (if not a bad practice)?
- How can I add extra attribute in the ‘Page Attribute’ section in wp-admin for pages?
- Is there a way to set default custom fields when creating a post?
- Custom post meta field effect on the performance on the post
- How to get custom post meta using REST API