For Wordpress developer, sometimes we are required to know in which page the shortcode is placed and this example will…