yes you can do that. You can use get_category_link for it.
if():
while():
the_content();
if(category == "category one"){
// Get the ID of a given category
$category_id = get_cat_ID( 'helper for category one' ); //get_cat_ID('category_name');
// Get the URL of this category
$category_link = get_category_link( $category_id );
// Print category link here
}
else{
display_nothink
}
endif;
endwhile;
endif;
You can also use action/filter if you dont have direct access to single.php file
Related Posts:
- How to add category to: ‘wp-admin/post-new.php’?
- Use category base slug in posts’ permalink
- Setting Custom Sort Order of Posts within a Category
- Different number of posts in each category
- Display the latest post from a category in a page
- How to show list of posts by author and category?
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- Getting Position of a post in a category
- How to control which category will be picked for the slug of a post?
- get_the_term_list by hierarchy order
- How to change the layout and styling of posts according to their category in WordPress?
- Add default content to post (for specific category)
- Query only Posts from Both of Two Category?
- display sub categories assoccited with each post in a category archive page
- Display most recent post in category instead of archive?
- How can I specify a category post on my home page
- How to search only by post title and category?
- Post in Multiple Categories to stay in current category (permalink, next previous post link)
- get_post_type_archive_link(‘post’) returns current category archive
- Permalink Settings: optional settings doesn’t apply to editor
- Get user’s most published categories
- Conditional that checks if a current category has any subcategory with posts
- How to set post expiration date and time and move the page to archive after expiration [closed]
- Exclude posts from featuring
- I want to show category in the post title , how can I do
- Articles are text-only in any “Category” instead of HTML
- How To Remove Certain category Posts From the Blog Page
- How can i sort the categories by ID
- Display posts in three columns by category
- Add icon/badge next to posttitle of specific category
- Add ajax load more function using WP API
- Get current category id from post page wordpress
- Saving category to a post, before publishing the post
- Exclude category from
- Assign category to new post via URL
- Stop users posting into category while still seeing contents of the category
- Category Page Template not Showing Posts
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- WordPress custom Query for Posts in Category display posts multiple times
- Categories list into registration form
- Using ajax on editing a category edit page?
- Disable sticky option for specific categories
- date issue with category post retrival
- Showing categories and subcategories with posts
- Change default category when I publish a post
- How to display two random-post sections that are each under their own category
- How to create a sub post?
- Post Image not displaying in category view
- WordPress bulk category select when publishing post
- Exclude some categories from listing on the current post
- how can i display my posts alphabetically?
- Change Post Title For Specific Category
- Unable to differentiate between two categories under custom post type on single.php
- In what context should Categories and Tags be used
- list posts from two categories on a page – plugin not working
- How to create a playlist for audio associated with posts per category
- WP_Query of Category Not Showing First Post
- posts going to 2 pages/categories only show up in 1
- Display Parent Category of a Post belonging only to Subcategory
- Can I style single post that are in multiple catergories?
- How to add content above footer in posts from specific category
- Rewriting blog permalinks
- How to make ajax load posts from the current category?
- WordPress – When visiting a `single post/ single.php` my category menu item link becomes active
- Show single post child category from a determined parent
- How can I create a ‘sub-blog’ which has its own sidebar on individual posts?
- I want to add the 10 most recent posts under a parent category on the main menu
- How to Create another Page Category like the “Post” and “Pages”
- how to filter posts by category without page load (ajax) in wordpress?
- How to increase the number posts that displays by a hierarchical taxonomy? (HTTP ERROR 500)
- How to distinguish pages created by woocommerce?
- How to create a button to filter posts (list) by meta value
- WordPress the_category(); only works with message-posts not with project posts, how do I specify project categories?
- I want to show recent post according to category of the post in single.php?
- Limit amount of categories displayed in a post
- AJAX load more posts not using correct category and repeating the same few posts
- Category posts show on local install, they do not show on live server
- Category and Posts in front page
- Allow registering user to select post category when signing up to blog
- Nothing appears using get_the_excerpt() in category.php
- Add category information beneath post?
- Custom plugin to get related posts by category
- Unable to uncheck a category in a post
- Next/Prev category post in same button
- Newly created category does not show category
- Show category post with excerpt text
- How to show different categories in different pages?
- Sort post by category using HTML Select tag
- Make assigning post to a specific category equivalent to assigning it to all categories
- Show a Category Specific Info Box
- How to use in_category?
- Display the first post’s comments of category in comments.php template
- How to filter categories of a post
- ‘get_previous_post’ in same category returning (!empty) when no previous post in category exists
- List posts related to category on a div [closed]
- how to show all post with its contents
- wordpress show category link instead of post link [closed]
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- How to display my categories in a list (to a post, not the sidebar)?
- How to make category for word post_content