Title: Removing line code from template
Last modified: August 22, 2016

---

# Removing line code from template

 *  [mlre36](https://wordpress.org/support/users/mlre36/)
 * (@mlre36)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/removing-line-code-from-template/)
 * Hi. I’m trying edit a theme I purchased and the developer told me to remove line
   186-191:
 * // Left Sidebar
    if($layout == ‘left-sidebar’) { echo ‘<div id=”sidebar” class
   =”col span_3 first”>’; if (function_exists(‘dynamic_sidebar’) && dynamic_sidebar(‘
   Listings Search Left’) ) :else: endif; echo ‘</div>’; } ?>
 * Any suggestions? I’m new to WordPress and have searched online and haven’t found
   a solution. I appreciate the help. Thank you

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

 *  [Kye](https://wordpress.org/support/users/gmax21/)
 * (@gmax21)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/removing-line-code-from-template/#post-5264906)
 * Hey there,
 * I don’t know which theme you refer to, I can’t see the themes code or what you
   want to actually do. Makes it hard to say.
 * As this is a commercial theme you will need to chat further with the developer
   on this one as per forum rules:
 * [http://codex.wordpress.org/Forum_Welcome#Commercial_Products](http://codex.wordpress.org/Forum_Welcome#Commercial_Products)
 * Take care.
 *  Thread Starter [mlre36](https://wordpress.org/support/users/mlre36/)
 * (@mlre36)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/removing-line-code-from-template/#post-5265005)
 * Thanks for your reply. My question does not relate to a specific commercial theme.
   It is a general question on how to remove code lines from a php file. I assume
   I don’t just “delete” the lines I want to remove, correct? Thank you
 *  [felixreddy](https://wordpress.org/support/users/felixreddy/)
 * (@felixreddy)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/removing-line-code-from-template/#post-5265007)
 * you can remove a Line in PHP by deleting it or adding a # tag in the beggining
   of the Line 🙂
 * As Far as i know
 *  [Kye](https://wordpress.org/support/users/gmax21/)
 * (@gmax21)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/removing-line-code-from-template/#post-5265117)
 * Hey there,
 * > My question does not relate to a specific commercial theme.
 * But you originally said:
 *     ```
       I'm trying edit a theme I purchased and the developer told me to remove line 186-191
       ```
   
 * If it’s a case of just removing that and you know where it is then as felixreddy
   mentioned, you can delete it, or if you wish to keep it you can comment it out.
   For larger blocks of code you can comment like this:
 *     ```
       /*
       CODE BETWEEN
       */
       ```
   
 * Or singular lines at a time:
 * `// CODE`
 * `# CODE`
 * You can also use these for commenting in code too.
 * Take care.

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

The topic ‘Removing line code from template’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 4 replies
 * 3 participants
 * Last reply from: [Kye](https://wordpress.org/support/users/gmax21/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/removing-line-code-from-template/#post-5265117)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
