Pages

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"]'); 
  }
  ?>

No comments:

Post a Comment

Search This Blog