On a category page, you can use the function single_cat_title(), or the more generic single_term_title(). These functions pull from the global $wp_query object, via get_queried_object().
Related Posts:
- retrieve thumbnail from post ID of best selling product in category
- Custom HTML structure in wp_list_categories
- Allow authors to post only in categories they create in WordPress
- How to Populate the list of custom post type categories
- Php string not working in WordPress Functions.php [duplicate]
- User Defined order on get_categories?
- Categories Template Assistance
- Error: array_map(): Argument #2
- Problems with function on function.php
- Use template for posts with a particular category grandparent
- Custom Loop through category menu to include sub categories
- Get posts with at least one category in common with current post?
- Woocommerce – remove product from category
- Get category name from custom loop and echo it once
- Display all categories including sub categories
- Custom category code not showing all posts
- hover image appears below placeholder instead of overlayed
- get current product name in functions.php
- How to use transient in this code for related post?
- Filter Select results based on selection
- What is an equivalent of single_cat_title for getting the slug of the category?
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- Pass Category Name, Description and Photo into variables to pass to jQuery
- How to show single category archive
- Move category description below post list in blog
- How to pick the default selected value in wordpress dropdown?
- Applying A Category to Existing Posts Where Page Title Matches Regex
- Setting default category base on theme activation
- Hide subcategories (widget)
- Let Users Choose Post Categories
- How to show only subcategories in parent category not parent category?
- Dilemma of Populating all the categories in a drop down list
- Display most popular posts of category
- JSON REST API WordPress only showing first 10 categories
- get taxonomy thumbnail and use it as a variable in code
- Get all categories post is not in
- Get latest post from all categories except one
- Rewrite with pagination /foo/page/2/ to posts of a given category, page 2
- In WordPress, how do I get the number of posts next to single_cat_title(”); in the category.php file?
- Only show size attributes in product box woocommerce when available
- Custom post type category not displaying category ID
- Argument for if term-> have child?
- How to get current post category details inside “loop”?
- Post not populating for custom post type based on category selection
- Echoing a CSS class based on category of post in a list
- Removing sidebar on category pages
- Showing Subcategory Name/Link Instead of Parent Category
- WordPress custom taxonomy
- go to home page when i select default in select-box
- Finding and removing duplicates within WP Arrays
- Compare current post Category in select menu
- Hard-coding a shortcode as the last menu item in primary navigation?
- Remove Custom Post Category In WordPress Slug Using .Htaccess
- Woocommerce. Get a list of products in the current category on the archive page and product page
- Wrong Number of Products When Hiding Subcategory Products From Showing In Parent Category
- How to show categories and date on posts
- How do I edit the terms output args or array data?
- Add a “custom field” to a category that can be retrieved when viewing the category page with get_post_meta
- Allow two posts (from different categories) to have the same slug
- Get main parent category for post (WordPress/Advanced Custom Fields)
- Display Visual Composer shortcode if a post belongs in specific categories
- Category Page Displaying all Pages
- How to enable HTML tags in category description without breaking the category page
- Trying to show the category of a post in the post display
- Link to index.php from home.php?
- How does Permalink work with the AMP plugin after Removing Parent Permalink Catalog from Posts
- Hide a specific category title from displaying on site
- Return to the beginning of the results of a for loop
- Exclude category and post from loop in custom category.php
- Admin backend, show post from a category and exclude the posts from subcategories
- Populate Posts based on category selected using AJAX that means without page refresh
- random woocommerce categories are not showing when count enabled?
- Exclude a category slug on pagination
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- How to Retrieve All Category Images on Front-End
- Short code into PHP
- Code works on page-example.php by not category-example.php
- Need Quick Help With Product Category Page
- get_category display only 1
- Need to adjust condition to say if I’m pulling categories from a post, to pull only the first one
- Make an array listing custom taxonomy
- Get category id for a custom category and display it in a class
- Search in particular category in wordpress
- Is there a way to randomize and connect a background and header image?
- wp_get_archive for category returning different URLs on different but similar sites
- Error trying import one category on page
- dynamically filter by category via sub-menu
- Get unique post in parent category
- Code that displays images – images get shown multiple times
- Incomplete term slugs output from a foreach loop with get_the_terms
- Display post of specific category on page
- Displaying categories
- Product Category Page in Full Width
- Display all categories (with link) of custom post type – WordPress
- How to limit number of posts in the certain category and exclude the oldest post automatically
- child category under correct parent
- Display featured posts first, then display all others within a specific category in WordPress
- Can’t assign menu parent id or menu item breaks
- Prevent publishing of uncategorized posts