WordPress.org

Ready to get started?Download WordPress

Forums

Comment out code in WP? (4 posts)

  1. sahdoggiemom
    Member
    Posted 9 years ago #

    How do I comment out code in my index.php file? I don't want to delete certain things in case I want to use them again, but that's standard.
    Thanks!

  2. Cypher
    Member
    Posted 9 years ago #

    If you are trying to comment out PHP code, you can surround it with /* and */ or if it's a single line you can use //.
    If you are trying to comment out HTML code that is outside the <?php and ?> markers, then you can use the standard HTML commenting mechansim of <!-- and //-->.
    Regards

  3. TechGnome
    Moderator
    Posted 9 years ago #

    Maybe you need to adjust your occular data input port. I can see cypher's stuff just fine. I'd like to note something though. What cypher suggested is commenting out PHP code, which will not affect any intervening HTML code. Conversely, what kafkaesqui suggested will only comment out HTML, but the PHP will still run - it will simply get commented out and not displayed (but it will be sene if yo uright-click and view source.
    TG

  4. Kafkaesqui

    Posted 9 years ago #

    *rubs eyes*
    Nope. Ain't helping...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.