On a category archive, get_queried_object_id()
will give you the category’s ID, which you can pass to get_category_link()
:
echo get_category_link( get_queried_object_id() );
Related Posts:
- Get the name an the description of a link category
- How to get category URL with the slug?
- Linking products to categories
- force category base – archive pages work WITH & WITHOUT category base slug in url?
- How do I get rid of “category” from my URL structure?
- Place category Base URL at the end
- How to display post type and category links in foreach WordPress code
- Latest updated categories list query, exclude one from displaying
- Anchor tag generates blank href attribute using echo esc_url( )
- wp_insert_link not working
- separate posts to have (kind of) 2 blogs?
- How can I display a list of categories of my posts
- can I ‘combine’ categories as a menu item?
- Show parent category wp_list_categories wordpress
- Showing the category hierarchy as clicked in WordPress, with image and desc
- Linking to the most recent post in my podcast category
- echo $category[0]-> cat_name; shows only one category name
- Creating a linkable category list with post count
- Custom EndPoint not working when strip child category in URL
- Is There a Difference Between Taxonomies and Categories?
- Get rid of WordPress category, tag and author archives?
- Filtering categories in the permalink structure
- get_categories hierarchical order like wp_list_categories – with name, slug & link to edit cat
- wp_nav_menu not appearing for a couple pages
- Why aren’t sub-categories nested after creating post in the WP Admin?
- Preventing index.php?category_name=something from redirecting
- How to get category id of current post?
- Programmatically create product category and add thumbnail in woocommerce
- Trash bin for categories
- Categories’ hierarchy in URL
- How to get next previous category in same taxonomy?
- Show Subcategory Description
- Check is category parent or not from its ID
- Which php file lists all the post of a category
- How to query posts from specific authors and categories using WP_query?
- Apply custom category template to subcategories
- How to customize tag and category post listings to show introductory content?
- List Terms in Category
- Can you have a single set of “canonical” categories shared by all blogs?
- List Posts by Category for a Non-Zero, Non-NULL Custom Field Value?
- Rename Default Category (Uncategorized) Via a Function
- How to customize category template?
- Customized landingpages for categories
- get_the_category_list open in parent window
- Show category images on single product page and product overview page
- Class active for Archive link – looped out
- Get parrent category name
- Display specific categories by ID
- Sorting category products not working
- Show category from “Next post” and “Previous post” [edited]
- Remove sub-menu item from admin menu
- How to add WordPress sub category without select
- How to get custom posts sub category link
- How to customize categories panel?
- ACF add custom fields to categories and display
- Custom taxonomy template for categories
- Undefined property: stdClass::$id when retriving term ID
- Wacky taxonomy in wordpress
- Link to the next/prev posts in index loop in same category?
- Output the text before category
- Change div background acording to the selected category
- get_the_categories() but exclude children of “Uncategorized”
- How to exclude a particular category from the category list
- Why title_li =” not working
- Custom Permalink with child categories creating 404
- Redirect year month day postname permalink structure to category postname structure
- Show all sub categories?
- Category nicename inside loop in wordpress
- Exclude all subcategories in the_category (post)
- Displaying another main nav menu for specific category
- Exclude categories from list (wp_list_categories)
- WordPress: Using the category slug get the category ID using mysql query
- Create a Category with a front-end post
- Exclude category to “the_breadcrumb” functions
- Migrate the posts of a category to another blog as a custom taxonomy
- Woocommerce only display child category when parent is checked (on add new product page)
- Add $args to wp_list_categories
- How to hide a category or tag everywhere EXCEPT for use with get_posts
- Taxonomy custom check box meta field not getting saved
- Subcategories randomly not working after page/post/category edit in wordpress. Fix: saving permalinks twice
- In if…else condition, the else statement shows even if if statement is correct
- Restrict retrieved terms by category?
- Get category from slug list
- How to Change Sort Order of default WordPress Catgory Widgets?
- Custom filters inside a specific category?
- $args Orderby The number
- Most efficient way to have 1 template for parent, 1 template for child categories?
- Function to list posts from current post’s category fails in WP 3.8
- Multiple parent categories
- Custom fields setup when category selected filter subcategories
- Make three menus with three category levels
- Getting categories to change appropriately when using $cat = ‘ ‘;
- how to call the category of the post
- Category related -> excerpt, title and thumb in sidebar on article page
- How to have a category not show up in query post with page panigation?
- single category widget with conditional terms
- why is the delete option missing from just one category?
- Get all categories
- Show category post order ASC
- How to display all category images for single post in a page?