Support » Themes and Templates » Making notes in code

  • Sorry if this topic has been discussed, but I’ve been searching for almost an hour now and can’t find the answer. I’m adding some analytics script to my file, but I want to notate it to remind myself what that script is if I go back into the file later and change it.

    First, I’ve been placing the code between the HEAD tags of my Header file. Should I be placing it in a different file?

    Second, I’ve tried adding the /* */ tags to make the text non viewable, but it still shows up at the top. Is there a better way/place to make these notes?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Your comments in a html file should be:
    <!-- my code starts here -->
    qwerty qwerty asdfg asdfg
    <!-- my code ends here -->

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    That will work, but another way is like so:
    <?php // this is a comment ?>
    <?php /* this is a comment too */ ?>

    The difference is that moshu’s way will have the comment in the actual source code of the page and anybody can see it. The php way above gets ignored during page processing, and will not show up in the final page, but will still be in the theme itself.

    thanks guys. I appreciate that tidy bit of info.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Making notes in code’ is closed to new replies.