So after some more digging was able to figure it out. Using the Advanced Custom Fields plugin, I created a text field that appears on attachments with specific tag applied to them. Now you can assign a value and I updated my WP_Query to reflect:
<?php
$args = new WP_Query(array(
'post_type' => 'attachment',
'posts_per_page' => -1,
'oderby' => 'meta_value_num',
'order' => 'ASC',
'post_status' => 'any',
'post_parent' => null,
'meta_query' => array(
array(
'key' => 'logo_sort_order'
)
),
'tax_query' => array(
array(
'taxonomy' => 'post_tag',
'field' => 'slug',
'terms' => 'logo'
)
)
));
while ( $args->have_posts() ) : $args->the_post();
?>
Hope this helps someone else.
Related Posts:
- Count the number of images uploded on the website
- How to paginate attachments in a secondary query as gallery?
- How do I exclude all images from a wp_query?
- get images attached to post
- query attachments of parent page if attachments of current page are smaller than …
- WP_Query: attachment image in “full” size?
- wp_get_attachment_image not to get the post_thumbnaill
- How To Query All Attachment Images Found In Post Galleries
- Some images not being returned with wp_get_attachment_image
- Broken? WP_Query and “attachment” as a post type
- Is it possible to query all posts that don’t have an attachment?
- How to paginate wordpress [gallery] shortcode?
- How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
- Getting attachments by meta value
- Get attachment by slug
- Get All IDs Of A Post Type Using WP_Query
- Get attached media only
- How to display images in related posts?
- post thumb nail
- Show all parents and children in custom post type in right order
- WP Query search for attachments and their exact title
- How can I pick a single post from the latest 3?
- Show selected images on top in Media Manager
- How can I query posts with newly uploaded images?
- How do I search inside specific taxonomies in WordPress
- Sorting By Custom Posts With Attachments
- Attachment changing page’s permalink – $post not resetting?
- How to fetch only media that was already attached to a post/page?
- How to do meta_query for attachments?
- Get attachment by meta_key value
- How to show optimized list of posts with all their attachment images
- Where to put meta Keys
- WP_Query Attachment adds additional attachment count and need to link attachment to post url
- Better wordpress attachment query than this
- How do you determine if a result in a search query is a post or a page?
- Why having more than 10 clauses in WP_Query results in some outputs being dropped?
- wp_query get attachments in larger size
- Creating attachments archive in tags and categories
- How to add WordPress featured image via SQL
- Display all attached image of every post of custom post type and link to original post
- Ignore image urls in wp_query search
- Custom wp_query differs on index page and category page
- Insert images into wordpress post with a query
- Find only those galleries with images
- Show multiple tax_query from 2 or more post_type in a single code
- How can I build a query that returns all attachments of a page and it’s children pages?
- get all images from the wordpress media library with link to the post they are associated with
- paginate_links appearing on page but it doesn’t actually paginate – pagination on a static page with a dynamic `post_type` argument on a static page
- WordPress private post won’t display to other admins
- How to restrict add media library only to images of the same post family?
- how to get custom attachment url?
- post_type not working when tag__in is present?
- Change database image location for transportability
- WP query retrieve the src of attached image
- Trying to use “Medium” featured image for custom post type on home page
- Query All Attachments and Order by Parent Publish Date
- Issue attempting a wp_query_posts with tags
- Display images with same specific value?
- WP_Query for attachments without duplicating post_parent and displaying tagged image
- Using WP_Query to get attachment returns empty set
- Pull Instagram images into an existing loop?
- Loop issues when creating custom query for media uploader
- Custom query for certain post type OR another post type with a certain category
- Give attachments an archive page, and exclude unattached ones
- on attachment.php, how to display previous and next attachment links that follow the same order as a custom WP Query
- WP_Comment_Query pagination, delving into the unknown
- Getting all user metadata from user
- Limit WP_Query to only X results (total, not per page)
- How to disable main query?
- Use post__in and post__not_in together?
- Compile two queries to one set of results?
- How can I order Wp_Query hierarchically?
- WP_Query ajax loader detect end of posts
- How to get count of posts assigned to given category?
- Wp redirect to url with ampersand string
- Change query based on post type while staying in loop
- Customizing the attachement page to show rest of all images in a gallery from post
- Custom Pagination Layout for Elementor widget
- $WP_Query: How to display excerpt on first post only
- How to properly reset a nested WP_Query query
- How Can I Change The Tax Query For The Main Loop For Taxonomy Archives?
- how to write wordpress query for multiple metakeys checking?
- Display post meta conditionally based on it’s value
- How can i show pagenavi in my author.php?
- Randomly select one of last 3 posts
- Using WP_Query with multiple loops on one page in search.php
- Order by post meta not working with pre_get_posts filter
- is_user_logged_in not working from WP-API (wp-json)
- Only show tag with the same id as the post
- Sort by price wpdb
- Custom image size not displaying with wp_get_attachment_image()
- Show a message if there are no active posts in category
- Problem with my loops
- next_posts_link not visible on first page
- Filter posts/pages by user_role array
- WP_Query with meta_value_num and meta_query not paged correctly
- I need value of saved meta to display next to the post it is associated with
- Post Query not working after updating to 4.1
- Search Query that Includes Custom Table
- Pagination with WP_Query not working