Example 1 — Any single post
Print a share note under every post.
<?php if ( is_single() ) {
echo '<p>Share this post with a friend.</p>';
} ?> How It Works
is_single()is true on a blog post.- It is false on Pages.
- The note is printed only on posts.

