-
As stated above, your
orderby
parameter should be set tometa_value
, notrestaurant
. -
Using phpMyAdmin or some other tool, look at your database. With any newer installation of WordPress, your tables should have a collation of
utf8mb4_unicode_ci
. That means that the table is storing its data in UTF-8 4-byte unicode character set. That “ci” at the end means “case insensitive”.
If your collation is not correct, then you may need to convert your data. This is not as easy as it sounds all the time, so make sure you get a quality backup of your database first.
Related Posts:
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- Return only Count from a wp_query request?
- Use REGEXP in WP_Query meta_query key
- Sorting: custom query with orderby meta_value_num THEN by title
- 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 get order of posts?
- How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
- WP Query orderby meta key natural sort?
- Get posts by menu ID
- SQL query equivalent to WP User Query
- 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
- Group posts by meta_key
- Sorting meta_value as integer doesn’t work
- WP_Query hit max joins… How else can I build a search function that uses custom fields?
- Sort in WP_Query(), not filter? Is it possible?
- Would this post meta be better added to the post table rather than post_meta table
- Front End Sorting Questions
- Woocommerce custom loop to show all the products [closed]
- Order By Multiple Meta Fields
- meta_query on a date range using an array of values
- How to speed up wp_query, took more 5s to run against 100k posts
- How to sort posts in admin by titles with dd.mm.yyyy format?
- Query Set Order By Author
- WordPress: Keep order of query_posts list of post ID’s using post__in
- Mysql query LIKE not working
- How to get posts on a specific date – WP Query
- Using WP_Query and WP_Meta_Query Outside of WordPress
- How to orderby meta_value_num with dollar ($) sign
- How to find exact match for search term in WP_Query? What is the additional string added in LIKE query in WP_Query?
- Improve wp query perfomance on large db
- why update and delete query not worked in custom table?
- Performance when getting post meta for post retrieved by meta value
- Hide Administrators From User List except current user (administrator)
- Using hook to use DISTINCT in a wp_query
- pagination with ‘no_found_rows’ => true,
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- WordPress Comments sort by custom meta key
- Order by summing multiple values
- Understanding the orderby in WP_Query?
- How to implement a new row_count method in WordPress?
- Help ordering Post loop by two meta values
- How to sort a custom wordpress query by combination of meta values?
- Query most popular terms by taxonomy over 2 week period
- WP Group posts by year(desc) > month(desc) > date(asc)
- Which is faster wpdb & get_row or wp_query & ge_post_meta?
- Does wp track views for posts?
- Sort WordPress Posts Meta value by Week not Day
- how update data through ajax and jquery
- How to order WP_Query to group results?
- I am having problem sorting custom post type using WP_Query
- how to get Nearby zipcode
- How I can change the condition or compare operator for WP_Query in pre_get_posts
- Update query for wp_posts and wp_postmeta
- How to use a dropdown to filter posts by custom field
- mysql query order by
- Display all posts in a custom post type, grouped by a custom taxonomy. How to sort the posts alphabetically and the terms by ID?
- WP Query and date format
- WP_Query with page_ids in arguments without a result
- How to sort queried pages by an array of page ids?
- get_var is neither a string, integer, or array …?
- SQL query injection with fifu image
- Customize the Sorting Dropdown in WooCommerce use another list or more page
- Order (by ASC) posts with meta_key so posts without values are last
- how to include orderby value that is empty?
- Why last row deleted when refresh page
- How to sort wordpress posts already selected by WP_QUERY
- WP Query – grouping posts by same meta key, adding together values from another key
- Woocommerce Get Orders By Meta Value
- SQL to join u3g_users & u3g_meta_value with repeating data
- Custom Woocommerce Product Query
- How sort products by calculate value? ( custom post meta, price, option)
- Move some posts to end of sort order, even if there is a sort in the wp_Query already
- INNER JOIN custom tables – SQL Query
- use mysql variable in a $wpdb->query to reindex a column?
- Order by value of Custom Field using url string
- Fix wp_term_relationships slow query in get_posts
- WP Query with meta queries
- WordPress Query optimaization for slow query
- Sorting query_posts() with a complex orderby filter
- Order 2 meta_queries differently in WP_Query?
- How to mix two orderby-parameters into one ordered result
- Query postmeta based on meta_value, return array of post_id
- Sorting Posts by Taxonomy thats not within the query’s $args
- Order Posts By Custom Field That is an array of objects
- Slow query when selecting with large meta query or post__in
- Combine WP_Query with array of custom data to single loop without breaking the pagination
- Wrap group of wp query posts to parent div by date/year
- Sorting posts by meta values: 2 different orders
- WP_Query always returning the last custom post
- Get a list of the last posts grouped by author and filtered by category
- Sorting: custom query with orderby meta_value_num THEN by title
- query_posts with sorting on a custom datestamp
- meta_query dates from an array
- Different sql queries count indicator on the main page [closed]
- wordpress sorting using array merge by price in ascending order but price with 0 must be show last
- WordPress query very slow on +/- 300k DB entries and 7 INNER JOIN
- Bulk delete comments, foreach loop