How about get_query_var(‘cat’). I think that should get the ID of the current category.
Related Posts:
- Display list of Sub-Categories and the posts they contain, within one main Category
- Categories list loop – add separator every year
- Exclude a category from the filed under list only on some templates
- Listing all posts from current category on page
- Display only one result from “get_the_category_list”
- Listing Parent, Child and GrandChild Categories and then the PostTitles on Page Template !
- How to find the number of Tags a post has?
- Get woocommerce catogry
- wordpress wp_list_categories
- wp_dropdown_categories and custom taxonomy + custom post type
- Get all sub-categories of a parent category
- Check child/parent categories if exists
- Show Available Taxonomy List with Current Category
- Display the last post by each category?
- List categories with custom code
- limit a list of tags to one category [closed]
- Categories list loop – add separator every 3 categories [closed]
- how to wordpress When I click on the category link, subcategories appear
- new WP_Query all post in a category inside the loop
- List Child Categorie and hide the parent
- Adding category dropdown list to theme options page
- Hide specific category from wp_list_categories
- How do I add a separator to my list of terms with get_category
- How to show a list of only categories (exclude subcategories)
- Category list with postcount
- Getting the posts list visualised in categories tree
- Return all Tags and Categories in Separate List
- get taxonomy list in a page in the wordpress
- How Can Hide Define Category in Post Contents?
- AZ Directory category
- Search tag within category
- Listing category
- List products from current category
- Way to show content of a post, but if exceeds character limit revert to excerpt?
- list taxonomy based on taxonomy
- Moving Blog and Changing URL
- How to check if I’m on the last page of posts?
- Get top parent category
- wp_update_nav_menu_item() to insert categories
- Redirecting specific category posts to subdomain
- How can I prevent users from creating new categories?
- Get child categories when clicking on parent category
- Block multiple categories from Blog
- Best and Cleanest way to remove /category/ from category permalinks? [duplicate]
- What type of page should i use? static page or category page? and what’s the difference? [closed]
- Categories vs. Page Site Organization
- How do I add a function on a specific post category?
- Open subcategories in submenu on click in primary menu
- How to add Categories to the top menu of the website?
- force category base – archive pages work WITH & WITHOUT category base slug in url?
- Retrieve Image from Media Library by it’s category
- Getting URL of archive (category) page
- Strip a word from wp_list_categories
- Get category url in loop
- Previous/next post links displaying wrong category than is desired
- SQL to migrate post types to taxonomy
- Order by category titles
- How to let users choose posts order in categories?
- WordPress category
- And/Or Category Query
- Show subcategories on a parent category page
- How do I add Category Body Classes to Admin?
- Category archive is displaying all posts rather than the specific category
- Use the category name instead of category slug in permalinks
- How to display sticky or latest published post on the current category page it belongs to?
- Category tags with comma’s
- Trying to create a Categorised Index (archive?) to use as my Home Page
- Filter posts by categories ajax is showing nothing
- How to display child categories of all parent category within a singe loop?
- How can I add a class to displays a category?
- WP_Query – using category__and when one of the categories is 0
- Multiple categories for one menu item?
- Hide categories from frontend, but not admin / post editor
- Exclude categories from homepage not longer working
- Post to inherit custom category background image from parent
- Related posts widget – category
- Editing Loop So It Targets Specific Tags?
- Check boxes for showing categories
- Header Link function not working. Problem with bloginfo()
- WordPress category filters as subcategories
- Sort posts alphabetically by category/custom taxonomy, insert divider between different types
- Display Category Name and Date Posted on Blog Post
- Modifying category order
- Please tell how to stop the category from showing up on posts
- Editing categories crashes WordPress site
- Remove “category” from permalink with add_rewrite_rule
- Next and previous links category infinite loop
- show only terms from parent category
- Accessible Subcategory URL’s pages without using .php hack
- How to display total views of all posts of one category?
- wp_list_category only showing to logged in uers
- Grouping parent categories into sections
- How to show “category” name?
- Querying Multiple Categories With Different Offsets
- filter single_cat_title avoiding the breadcrumbs
- htaccess redirect for all categories converted to tags now showing 404
- Category page with gallery for each post
- Search functionality with multiple categories
- How to define category ID in an array?
- CPT Custom post type Tags & Categories not showing for ‘Editor’ user in editor