Try using get_queried_object():
$term = get_queried_object();
echo $term->name;
If you get nothing there, try this:
print_r($wp_query);
Everything you need is in the $wp_query global.
Hope this helps you.
Related Posts:
- 3 random images from custom post type, each in a div with a diffrent class
- Listing all term items alphabetically / sorting loop
- How do you create a custom template to display a category with an image and related posts below?
- pagination not working for category.php (custom post types in categories)
- How to display Related Posts based on number of taxonomy terms matched
- how to post default thumbnail if post not created yet
- get_the_post_thumbnail_url(‘full’) returns empty from custom post type
- Set featured image to archive.php
- Filter date from post meta when date is in string format
- Unable to set featured image
- query_posts adding extra code to homepage
- How to show only the most recent post on my custom post type archive?
- Post-thumbnail only for specific post-types?
- How to make WP_Query not to show irrelevant posts?
- What is the ID parameter for custom post types in query_posts?
- Loop for custom post types filtered by a taxonomy
- Featured image size in column
- False Positive on has_post_thumbnail
- How to limit post per page of custom post type?
- Custom query – get_the_terms not work
- Why are some of my custom posts not showing up on my page?
- post-per-page and offset not working
- Control content before and after custom post type loop
- Custom post doesn’t show featured image
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- Display custom posts randomly in custom taxonomy archive
- Is it possible to add posts and images (auto resize) for custom post types with a script?
- Getting all ID’s matching a title in a custom post type
- why is the current page title being output?
- Count custom post type based on two meta data
- Querying multiple values from a single key
- Not able to export large no. of posts in csv
- attach CPT data to a taxonomy
- Pagination not working on custom query on a page
- Loop through posts of only 2 statuses
- Targeting custom post type via functions.php doesn’t work
- find custom post type post by searching its custom field with my string
- FacetWP paging custom wp_query
- Auto post creation
- Dynamic pages for linked categories and content
- Can’t change posts per page in WordPress Post Type Query
- Using Image Sizes for Custom Post Types outside the Loop
- postsperpage value not being applied
- link featured image to external link
- Best way to create a search for custom post type by custom field values
- Dynamic category name in query post
- Incorrect ordering of custom post type based on time
- List all posts in taxonomy term
- Query all post types but limit to parents
- HM CMB: Post Select Field for CPT ID
- 4 posts per page from single category
- Cannot upload featured image to a custom post type
- Display Posts Query with IF function
- Thumbnails Not Generating
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Custom Post type showing up in loop, regular posts are not showing up
- Query Custom Post Type based on text input
- Add Permalink to Post Thumbnail, syntax code issues
- Need help with simple “if statement” checks to output particlular CPT data depending on what client uploads/fills out
- Getting custom post type info using get_adjacent_post
- Custom Post Type Query W/Category Dropdown
- Query all posts under one taxonomy? Why is my code not working?
- Custom Post Types Not Showing Up In query_posts Result
- Find Posts based on Child Post value
- Query for bbPress replies to current topic?
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- Showing only posts from the current user who is logged in?
- Why can’t I query more than 1 post type at a time?
- Sorting the Loop by Taxonomy Value
- Custom Query: Multiple CPTs and a taxonomy filter
- WP query_posts group by meta field related
- How to add Support to show Fullwidth Featured Image of Custom Post Types in WordPress.?
- returning the currect URL for nested posts
- Sticky posts limit query and pagination for a custom post type
- Custom wp-query display post only today
- i need to have a tab with gategory post
- Put featured image under post title in admin area
- Custom post type archive page filters
- Filling custom post type posts from a rest api
- custom post type and a “sticky” position taxonomy
- How to add a default predefined thumbnail when creating a brand new post?
- Create a post automatically if search result has zero results
- Trying to list years (for a filter) but not all years display
- custom post type and user post count shortcode
- Limit custom post type to the authors only on front-end!
- Modify default Related Posts Code to Custom Post Type
- Posts per Page on custom Taxonomy Template
- Use WP_query to match post types based on custom field values
- Order Posts in Custom Order
- minimize wp_query call to database
- Group Custom Posts Types in a Relation field of ACF
- Use WP pagination functions on a custom page template
- Can I show some specific post rather than latest post?
- Getting Custom Posts with Custom Taxonomy
- Query the title of the page to show posts with matching category in the loop
- Display featured images from custom post type in the homepage template
- update a posts of other custom post type
- why featured image option isn’t showing in custom post type?
- How to Create movie schedule by custom post type query
- How do I get the posts from single page custom post type from a sidebar to display in a page?