WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Having some text appear only pages

[Resolved] Having some text appear only pages

  • In the comments.php
    I only wanted certain text to appear in the pages comments and some to appear in my normal post. Is there a way to do it using php includes or something like that?

    Thanks 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Change your “Comments” template. You’ll want to make use of the is_page() tag. For example:

    <?php if (is_page()) : ?>
    <p>This is on a page.</p>
    <?php else : ?>
    <p>This is on a post.</p>
    <?php endif; ?>

    Thanks sunshine =D

    It’s working great 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Having some text appear only pages’ is closed to new replies.