WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Having some text appear only pages (3 posts)

  1. Truth
    Member
    Posted 8 years ago #

    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 :)

  2. sunshine
    Member
    Posted 8 years ago #

    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; ?>

  3. Truth
    Member
    Posted 8 years ago #

    Thanks sunshine =D

    It's working great :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.