If you mean a single post, not a page then use the conditional tag is_single()
and check for this, like:
function demo_link() {
if ( is_single() && in_category( 'themes' ) ) {
// Some code #1
} else {
// Some code #2
}
}
add_action( 'thesis_hook_after_post_box', 'demo_link' );
If you will use it on page, static post type from WP, then use is_page()
or use is_singular()
for post and page. The current example check for post and if in category ‘themes’, the output ‘Some code #1’ or if not this conditional statement, the output ‘Some code #2’.