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
- The topic ‘Remove Elements by div id’ is closed to new replies.