It doesn’t look like you can do this with the gallery shortcode, unfortunately.
The Codex doesn’t even list meta_value_num
as an option (though that doesn’t mean it couldn’t work.) However, you’re correct, you must specify a meta-key to use that ordering scheme with WP_Query.
Related Posts:
- How to paginate wordpress [gallery] shortcode?
- How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- Sorting: custom query with orderby meta_value_num THEN by title
- Is it possible to query all posts that don’t have an attachment?
- Sort posts by category name and title
- How to get order of posts?
- WP Query orderby meta key natural sort?
- What kind of object type is WP_Query?
- Last post ordered by publish date using WP_Query on front page
- Loop through all tags & output posts in alphabetical list
- Ignore a filter on the media library
- Sorting Posts by custom field
- Shortcode returns escaped HTML tags
- WP_Query in a shortcode
- Pagination not working on static page
- Sorting meta_value as integer doesn’t work
- Sort in WP_Query(), not filter? Is it possible?
- Front End Sorting Questions
- Woocommerce custom loop to show all the products [closed]
- Sort by meta key on archive page
- How to sort posts in admin by titles with dd.mm.yyyy format?
- Query Set Order By Author
- ‘&’ causes an error in my shortcode when I list the content of the page
- WordPress: Keep order of query_posts list of post ID’s using post__in
- Can certain (site-crashing) limitations on WP_Query in shortcode be overcome?
- How to make orderby ‘meta_value_num’ OPTIONAL?
- Meta query with order by another custom field
- How to retrieve current page WP_Query arguments?
- How to orderby meta_value_num with dollar ($) sign
- How do I sort posts with multiple pages
- Add custom setting that uses radio button to WP Gallery
- wp_query add arguments using array_push if variable met
- Category attribute not working in custom shortcode
- WP_Query posts by distance based on LAT & LNG in Database
- Check if post has gallery images/media
- How to fetch only media that was already attached to a post/page?
- Changing WP_Query params with url Query Var
- How to get all child pages in their parent page?
- Database Queries Optimization with new WP_Query
- Exclude an array
- Site not getting correct featured image from my query
- Sort wordpress custom posts based on meta value
- Orderby is working with one query but not with other
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- WordPress Comments sort by custom meta key
- Understanding the orderby in WP_Query?
- WP_query sorting can’t sort danish letters (æ, ø, å)
- Ho to add “Create Slider” option to default “Add Media” popup?
- Help ordering Post loop by two meta values
- How to sort a custom wordpress query by combination of meta values?
- Shortcode for latest -not expired- posts
- WP Group posts by year(desc) > month(desc) > date(asc)
- How to filter a query by date in a shortcode?
- How should I approach changing the template & $query as part of a shortcode’s execution?
- Does wp track views for posts?
- Sort WordPress Posts Meta value by Week not Day
- How to order WP_Query to group results?
- I am having problem sorting custom post type using WP_Query
- Shortcode Not Working in Slider When Added To Post Title
- Shortcode for custom query not returning results when attributes are added
- How to Display Shortcode in the correct location, currently displaying before content after Page Title?
- WP_query only displays one of my custom post type entries
- Sorting search results with custom dropdown
- Assign a minimum result count for WooCommerce query shortcodes?
- How to use a dropdown to filter posts by custom field
- Display all posts in a custom post type, grouped by a custom taxonomy. How to sort the posts alphabetically and the terms by ID?
- Using a Shortcode to List Posts from Multiple Categories
- How do I sort this custom list of sticky posts
- WP Query and date format
- embedding shortcodes in php template
- How to get specific string in explode array?
- Find only those galleries with images
- How to sort queried pages by an array of page ids?
- orderby ignored by wp_query
- Trouble passing attribute into shortcode function
- Woocommerce Shortcode which displays a table with product data
- get all images from the wordpress media library with link to the post they are associated with
- 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 sort store location by specific category order in WP store locations
- how to include orderby value that is empty?
- How to sort wordpress posts already selected by WP_QUERY
- Sort by price wpdb
- Custom Woocommerce Product Query
- WP Query by 4 different taxonomies
- How sort products by calculate value? ( custom post meta, price, option)
- create custom shortcode wp and put php code in
- Get authors list and sort them by recent posts
- Move some posts to end of sort order, even if there is a sort in the wp_Query already
- How to display a post(by id) along with css in a page?
- Order by value of Custom Field using url string
- How to restrict add media library only to images of the same post family?
- WP Query with meta queries
- Order 2 meta_queries differently in WP_Query?
- How to upload 3 attachments to current post?
- Case insensitive ORDERBY in wpquery
- Shortcode attributes causes 500 error after updating the page
- Sort posts on custom field AND after that sort on date?
- How to mix two orderby-parameters into one ordered result