WordPress.org

Ready to get started?Download WordPress

Forums

<?php } ?> (3 posts)

  1. sevenzen
    Member
    Posted 8 years ago #

    Can someone tell me what this is ?? If it is anything at all

  2. Orin
    Member
    Posted 8 years ago #

    In php, you can set conditions for when to do something. For instance, is_search() in WordPress will be true anytime the page being displayed is a search page. To execute code when it is true you use brackets {}. These brackets can cover multiple lines and you can put normal ol' html in between if you like. For instance:

    <?php is_search() { ?>

    <!-- notice no closing bracket -->
    You're currently looking at a search page.

    <?php } ?>

    So all that inside those will only display when those conditions are true. If you're interested (which I doubt, since that seemed just an idle question) there's more info in the Codex.

    And that's where lonely brackets come from.

  3. AuctionMaster
    Member
    Posted 8 years ago #

    Weird thing, I haven't seen this construction yet

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags