In the taxonomy-user_image_category.php
the get_queried_object
method will return the term object, which you can incorporate to your WP_Query
. From top of my head, in your case it may look like this:
$queried_object = get_queried_object();
$term_id = $queried_object->term_id;
$args = array(
'post_type' => 'user_images',
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'sui_image_category',
'field' => 'id',
'terms' => $term_id
)
)
);
$posts = new WP_Query($args);
Related Posts:
- add_action priority and taxonomy used in plugin
- Insert terms for custom taxonomy on plugin activation, or each page load (init hook)
- $_FILES empty on created_{taxonomy} and create_{taxonomy} yet is is not on edit_{taxonomy}
- Why is the WordPress taxonomy not registering?
- Translate slug in WPMU with PO files
- How to Get Current Custom Post Type Associated Taxonomy Term
- How to remove plugin-specific custom taxonomy terms when plugin is uninstalled?
- term_exists() returning NULL on term that exists
- Non editable custom taxonomy
- How to create taxonomy without using register_taxonomy () function
- Add location tag to wordpress posts
- Using init hook for register_taxonomy is causing invalid_taxonomy in wp_insert_term()
- Javascript not being loaded only in custom taxonomy template
- set a custom post type to a taxonomy term programmatically in metabox
- How to get a terms and posts associated with another term?
- How do I display the taxonomy for a custom post type in an array
- WordPress Doesn’t Generate Taxonomy Archive
- How to set taxonomy in custom plugin?
- How to limit number of number of categories displayed by categories widget
- How to get post’s current parent term ID?
- Plugin templates vs Parent Theme
- Ordering taxonomies by rank
- How to make “upgrade safe” theme for a plugin?
- Override Taxonomy Template
- wp_get_post_terms Order by not working
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- Display custom taxonomy attached to the post on post single page
- Ajax is not working in a loop
- Taxonomy term page going to 404
- Main query not querying any posts in custom taxonomy template
- Copy taxonomy terms from one post to another programmatically
- Taxonomies within plugin invalid
- Returning One custom taxonomy term name
- Displaying Custom Taxonomy without a hyperlink
- Let plugin check if taxonomy is already registered by another plugin
- Why get_page_template() doesn’t show taxonomy template file name?
- Default taxonomy template in plugin, override in theme
- Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
- How to add custom meta to ‘pre_get_terms’?
- Get Comma Seperated Taxonomy Linked Terms and Last Child Separated By “&” Instead Of Comma
- How to filter custom taxonomy term name, slug, and description?
- How to create templates for a custom module to show on the front end within my theme?
- How to group all terms children’s in custom taxonomy?
- Hierarchical taxonomy list with modificated term links
- WP Job Manager plugin – Listing only the twelve job categories on frontpage order by jobs they have
- Show template part if part of term
- Why aren’t some plugin styles loading when I load a template?
- one post per term taxonomy
- Plugin custom post template; without overriding all posts
- How can I change the output display of my pagination?
- Exclude product attributes from taxonomy terms loop
- modify show UI of a registered taxonomy
- Corrupted nav-menu?
- Get name of taxonomies of current page
- How add default term meta to prevent an error?
- List Top 5 taxonomy terms based on number of post
- Best way to distribute templates and code accross multiple wordpress sites?
- Custom Taxonomy Terms in Menu lead to which page?
- Load php file with jquery in single.php
- Order taxonomy terms wordpress
- Unable to get the Parent Custom Taxonomy Terms
- How to get the term description in a taxonomy term archive query?
- Unsetting post_tag taxonomy breaks term description for other taxonomies
- Use wp_list_categories to list parent categories from actual term
- Include get_term_link inside search
- Trash Bin for Categories?
- Set two terms for a post when they differ only by an accent
- How to use custom slug and custom templates for custom taxonomy?
- Add default custom taxonomy to plugin activation
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Retrieve the child terms by having the parent’s information
- add pagination in wordpress page template
- get the term_id of current taxonomy page
- How to order taxonomy terms by most recent post?
- How to limit number of category term display in home page grids?
- Listing Cities A custom taxonmy by selection order
- Cloning product not copying custom taxonomies
- delete category on plugin deactivation wordpress
- Get WooCommerce product category list in functions.php
- How to create a non removable taxonomy term?
- Overriding the template files using a plugin for all themes
- How do I use a plugin to swap out the template file for a custom post type?
- Filter “get_terms” query
- Get all posts for custom taxonomy term
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- Add new header/footer on landing page with plugin
- Pages of my taxonomy terms are showing all posts
- generate random slug when adding taxonomy
- Get Highest and Lowest get_term_meta() value from Taxonomy Term
- How to define a custom hierarchy for terms?
- Single taxonomy for different custom post types
- Use a page as a template for a custom post type
- Making Woocommerce optimized for more than 500k products
- Displaying subcategories and then posts in taxonomy template
- Why get_terms() behaves strangely when being called in admin (for use in meta box)?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Get custom term link archive with prefix
- Is there better way to do this without duplicating queries?
- set_object_terms for custom taxonomy in custom post type – not working
- Filter Term By Parent Term – Custom Post Type