Title: Commnet out Code?
Last modified: August 19, 2016

---

# Commnet out Code?

 *  [brian-in-nj](https://wordpress.org/support/users/brian-in-nj/)
 * (@brian-in-nj)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/commnet-out-code/)
 * I was wondering if anyone knew a way to simply comment out code so I don’t have
   to delete it entirely if I want to have the features in the template later on.
 * For example, there are a number of features on my template sidebar that I don’t
   want in this first launch, but I might want back again. I backed up the sidebar.
   php file, and then cut out the code for the unwanted features. But if there’s
   a way that I could signify the unwanted code as being a comment for the program
   to ignore, that would simplify things. I tried putting /* */ tags in, but that
   didn’t seem to work. The symbols just showed up on the sidebar.
 * Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 11 months ago](https://wordpress.org/support/topic/commnet-out-code/#post-799829)
 * Use `<?php /*` and `*/ ?>` instead. The /* */ comments only work when they are
   inside PHP blocks, not in the HTML sections.
 * If you want the code to remain on the webpage but just not display, then `<!--`
   and `-->` will work. This will make it still there and still sent to the browser,
   but the browser will ignore it. The PHP comments will make it not sent to the
   browser at all.
 *  Thread Starter [brian-in-nj](https://wordpress.org/support/users/brian-in-nj/)
 * (@brian-in-nj)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/commnet-out-code/#post-800097)
 * Thanks Otto. That looks like it iwll work. Just out of curiousity, is it better
   for search engine results to use the latter, i.e., <! … –> pair?
 * Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Commnet out Code?’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [brian-in-nj](https://wordpress.org/support/users/brian-in-nj/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/commnet-out-code/#post-800097)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
