'category_name'
will not work. You are making use of a custom taxonomy, not build-in categories. It seems from this that you have a misunderstanding about taxonomies. Please take your time and see this post on this particular subject
For custom taxonomies, use a tax_query
to retrieve the posts that you need. Here is an example:
$query_images_args = array(
'post_type' => 'attachment',
'post_mime_type' =>'image',
'post_status' => 'inherit',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'attachment_category',
'field' => 'slug',
'terms' => 'SLUG OF YOUR TERM',
),
),
);
$query_images = new WP_Query( $query_images_args );
Related Posts:
- Add Image Size for one Media Category Only
- Image Upload Custom Form Field for Category and Custom Taxonomy
- Media Categories as Classes on WordPress Gallery Shortcode
- Woocommerce get category image full size
- Filter by post category in Media Library
- Way to force media uploader use custom image size
- categories on attachment page
- Taxonomies for WordPress Media Library [duplicate]
- Display the featured image from the last post
- Extract image url associated to a category
- Show category images on single product page and product overview page
- Link Attachment Image to Category
- Change thumbnail image depending product category
- category image taxonomy
- categories on attachment page
- get_post_meta not working on category.php
- Redirect to another page using contact form 7? [closed]
- Random Featured Image Based on Category
- Category images are not displaying in WordPress
- How do you use the featured image of the most recent post in a category as the background image
- Need to echo category id in multi-dimensional array
- How to link a PDF file to a category URL
- Category view with contents of [gallery]s shown
- How to add image for all posts associated to specified category?
- How to display WooCommerce category image in my category page banner as a background?
- How to make product image inherit from category image
- How to display categories image in loop homepage WordPress
- Change background image page header overlay for each category
- Icon images across multiple categories
- Media Library Category Exclude Tree
- Media Library Categories
- How to relocate images
- In a shared site, how to get products in a category from one site to another?
- Display one post on category.php: Wrong featured image
- Media Library filter returns undefined function get_current_screen
- Category page with gallery for each post
- Image menu showing categories in page
- Featured image for links and categories
- Get all first images of posts in same category
- Add category image before post title on homepage
- how do i set an image for a category in admin panel
- How to link images of one WP site to another WP site?
- How to create a photo gallery that can be filtered by the image categories
- Images as Categories
- Limit Loop to One Category
- How to display posts from specific category using get_option function?
- How to load several hierarchical categories from functions.php
- Displaying a custom field in Category Archives
- wordpress taxonomy query posts
- Problem with Custom Post Type Categories
- Display post thumbnail for specific category outside the loop
- List post only under the category, exclude child category content
- Display Sub-categories or Child Pages of Parent Cat/Page?
- Assign a custom post to a custom taxonomy based on custom field value
- How to get category names in post_class?
- How can i show categories of custom post
- How to check if a categoryID exists in a theme options page
- PHP dynamical conditional post display
- wp_dropdown_categories initial value
- How to display product categories and number of sales on WooCommerce
- Posts of specific category on page and excluded from index.htm
- Display one category and its suncategories
- output only if within a combination of two cats
- Add multiple orderby with pre get posts
- How to differentiate the homepage structure from the category page structure in WordPress template?
- Panoramica Theme Portfolio
- new WP_Query issues
- Multiple category columns and post counting list in wordpress Homepage
- Filter Category Loop Dynamically
- Advanced permalinks structure
- SQL query to get posts from multiple categories but not in a category
- Can each user have only access to a private area (his own categories and posts)?
- Setting selected term_id with wp_dropdown_categories?
- Filter categories/tags to display in multiple metaboxes for selection in back-end
- how can i hide category?
- Check is category parent with ids from the childs – get_term_children
- Pagination breaks on child-categories, works fine on parent-category
- Homepage custom recent news
- post_class remove tag- or category- from slug
- Assigning certain pages or posts to use the template of the parent page or category
- Showing posts from 2 categories only on category.php
- Is the part “category” fixed to an URL to an archive or post?
- Posts not listing out sub category in hierarchy
- creating categories programmatically
- Post to inherit custom category background image from parent
- Pagination for a category
- How can I use AJAX with check-box categories?
- Related posts widget – category
- Natural sort / ordering wp_dropdown_categories
- Custom url structure – pages under a custom post type
- Make wp_dropdown_categories into a variable that persists until changed?
- Split multiple categories into two columns
- Editing Loop So It Targets Specific Tags?
- Change Default Content when Creating a Post based on Previous Category Choice
- show category in woocommerce
- wp_delete_term or wp_delete_category?
- Display category and associated post listings
- How to correctly display category’s slug as a class?
- Category List and Automatic jQuery classes
- prefix to post permalinks without affecting category permas