Title: Remove Elements by div id
Last modified: August 21, 2016

---

# Remove Elements by div id

 *  [murthax](https://wordpress.org/support/users/murthax/)
 * (@murthax)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/remove-elements-by-div-id/)
 * Hi All,
 * I’m converting a HTML site to WordPress and I’m faced with importing the sidebar
   on every page. I’m using WordPress Import 2 plugin with good success on other
   sites but here I can’t seem to avoid importing the sidebar with every page.
 * I could have a solution if I can selectively remove a particular div id I could
   make it work. I “think” I need some jQuery script to remove it before the closing/
   body tag though I’m honestly not sure.
 * Here is the source of the page:
 *     ```
       <div id="columnMain">
       <div id="contentLeft">
       CONTENT HERE
       </div>
       <div id="containerPageTitle">
       <h1 id="pageTitle">Criminal Defense Lawyers</h1>
       </div>
       <div id="content">
       ```
   
 * and here is what I was using before /body:
 *     ```
       <script>
       $(document).ready(function(){
           $("#contentLeft").remove();
       });
       <script>
       ```
   
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been permanently damaged by the forum’s
   parser.]_
 * Any help is appreciated.
 * Eric

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/remove-elements-by-div-id/#post-5022026)
 * > I’m faced with importing the sidebar on every page
 * What do you mean by “importing the sidebar “?
 *  Thread Starter [murthax](https://wordpress.org/support/users/murthax/)
 * (@murthax)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/remove-elements-by-div-id/#post-5022146)
 * Well the HTML imported page has a section that I seem forced to import (a div
   id). I want to remove that section on every page.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/remove-elements-by-div-id/#post-5022148)
 * So this div is in the old site?
 *  Thread Starter [murthax](https://wordpress.org/support/users/murthax/)
 * (@murthax)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/remove-elements-by-div-id/#post-5022150)
 * Yea, it’s on every page like:
    <div id=”columnMain”> <div id=”contentLeft”> CONTENT
   HERE </div> <div id=”containerPageTitle”> <h1 id=”pageTitle”>Criminal Defense
   Lawyers</h1> </div> <div id=”content”>
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/remove-elements-by-div-id/#post-5022151)
 * As this isn’t actually a WordPress issue, all I can suggest is that you try using
   a search & replace tool that can grep multiple files and remove that markup.

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

The topic ‘Remove Elements by div id’ is closed to new replies.

## Tags

 * [remove div](https://wordpress.org/support/topic-tag/remove-div/)
 * [remove section](https://wordpress.org/support/topic-tag/remove-section/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/remove-elements-by-div-id/#post-5022151)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
