WordPress print something only for certain page

WordPress print a short code or a HTML element in your files by hardcoding only for certain page in your wordpress blog

You can use the Page ID Post ID or the Slug

  <?php
  if (is_page('11')) {
    echo do_shortcode('[metaslider id="190"]'); 
  }
  ///
  if (is_page('about-us')) {
    echo do_shortcode('[metaslider id="190"]'); 
  }
  ?>

Leave a Reply