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?
- What’s the difference between term_id and term_taxonomy_id
- Get Posts by Custom Post Type ,Taxonomy, and Term
- Inserting Taxonomy Terms During a Plugin Activation?
- How to limit the number of terms (terms acts like categories)
- How do I list custom taxonomy terms without the links?
- Exclude specific slug in ‘get_terms’
- wp_insert_term doesn’t work with custom post type’s taxonomy
- Return only the custom sub-term for custom post type, do not echo term-parent
- How to Make a Category Always Selected?
- Custom Taxonomy Only Showing Top Level Terms in Admin?
- Is it possible to get a Previous/Next Taxonomy term archive URL?
- How to properly use a hook to create template for custom product type in a plugin such as Woocommerce? [closed]
- How to display term description in empty terms archive?
- Display empty taxonomy terms with get_terms()
- Checking if a Page has an Associated Term?
- How to check active theme is parent or child wordpress
- What are terms and taxonomy, how they related to post and how these three are stored in database?
- Get all taxonomies for all post types
- Adding Multiple Values to a Post Meta Key
- WordPress removing data attributes for scheduled post
- Is there a way to loop through a shortcode datasource to create a table?
- How do I provide a “show all posts” link in a paginated term archive?
- Generic taxonomy-term template page
- How can I get WP to build a feed based on multiple taxonomy terms
- display taxonomy slug from term ID
- get_term_children doesn’t return an array of children terms
- get_term and get_term_by return null or false, even though term exists
- How can I turn a custom wordpress page into a product page?
- Setting posts_per_page for taxonomy term template
- Notice: Trying to get property ‘term_id’ of non-object
- How do I display the taxonomy for a custom post type in an array
- How to set taxonomy in custom plugin?
- How to get post’s current parent term ID?
- Plugin templates vs Parent Theme
- Ordering taxonomies by rank
- 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()?
- Ajax is not working in a loop
- Taxonomy term page going to 404
- 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
- Why get_page_template() doesn’t show taxonomy template file name?
- Default taxonomy template in plugin, override in theme
- WP Job Manager plugin – Listing only the twelve job categories on frontpage order by jobs they have
- Show template part if part of term
- one post per term taxonomy
- Plugin custom post template; without overriding all posts
- How can I change the output display of my pagination?
- Corrupted nav-menu?
- 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?
- Use wp_list_categories to list parent categories from actual term
- Include get_term_link inside search
- Trash Bin for Categories?
- 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
- How to order taxonomy terms by most recent post?
- How to limit number of category term display in home page grids?
- delete category on plugin deactivation wordpress
- How to create a non removable taxonomy term?
- Add new header/footer on landing page with plugin
- Pages of my taxonomy terms are showing all posts
- 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
- Why get_terms() behaves strangely when being called in admin (for use in meta box)?
- qtranslate-x problem with custom term description
- Page template compatibility with different themes
- WordPress add taxonomies/terms list as a menu in archive page
- Display List of Categories Within a Custom Taxonomy
- Access WordPress Tag Function From Modal
- Get term_id for each instance of custom taxonomy
- How to show custom taxonomy child posts through shortcode in WordPress
- How to check during “pre_get_posts” if WP performing default query for specific custom template?
- List custom taxonomy terms
- Display associated taxonomy child name on single CPT page
- Issue On Listing Woocommerce Parent Tag List
- is_tax not working for custom taxonomy
- Help interpreting @wordpress/create-block-tutorial-template usage error
- Theme template file for a specific custom taxonomy
- How to delete unused terms?
- How to boost WP custom post REST API GET queries by custom taxonomies