How to insert shortcode in header.php but show it only on some pages?


  • Open header.php of the current wp theme and go on the same bottom of the file or in place where you want to place it
  • For example you want show shortcode with ID 177 on two pages, with page-ID 22 and 77
  • Drop the shortcode in the next code example: