WordPress.org

Ready to get started?Download WordPress

Forums

PHP Noob question (2 posts)

  1. ronronmx
    Member
    Posted 4 years ago #

    I'm trying to change some php code within my template to fit it to my needs better, and I have 1 small question:

    What's the difference between:
    <?php if (is_single() get_sidebar()); ?>

    and:
    <?php if (!is_single() get_sidebar()); ?>

    What does the ! do in front of is_single?

    Thanks....

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Reverses the logic.

    if (is_single() = if this is a single post
    if (!is_single() = if this is not a single post

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags