If I understand the question:
Modify the shortcode to incorporate
<?php if (is_post()) { //do this; }?>
or
<?php if (is_page()) { //do this; }?>
or
<?php if (is_home()||is_front_page()) { //do this; }?>
The first will only do //do this; on a post, the second on a page, and the third if the post or page is the homepage.