How to display custom content in post with category XXX

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