Title: why twice sidr elements?
Last modified: March 3, 2020

---

# why twice sidr elements?

 *  Resolved [minguet](https://wordpress.org/support/users/minguet/)
 * (@minguet)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/why-twice-sidr-elements/)
 * > [View post on imgur.com](https://imgur.com/N6XKlQ6)
 * – sidr-close
    – mobile-nav – mobile-menu-search
 * and really side mobile menu is down <script>
 * I trying make form with id, and see have twice heheh…
    Then, try .remove() this
   3 element, but then no have none…
 * I guess I can give him a class, and take the second…
 * or some idea?? Thanks

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

 *  Thread Starter [minguet](https://wordpress.org/support/users/minguet/)
 * (@minguet)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/why-twice-sidr-elements/#post-12504255)
 * *sorry my bad english
 * I think understand it.
    1. Those 3 elements was are loaded. 2. sidr replicate
   those 3 elements content.
 * Result: twice elements
 * I was be trying catch an checkbox form in mobile menu by element id, and always
   all unchecked.
    what was happening is that I was fill out the form in sidr (2)
   but reading the (1)
 * SOLUTION (for lack of something better)
 * * it is necessary to place the code somewhere in the mobile menu.
    It will not
   serve place it in additional JS. I pasted it in a mobile menu link, just after
   the visible name: Link_Text <script> … </script>
 * * It will be executed twice, when loading nav-menu and when creating the sidr.
   
   Therefore, it must be prevented from running the first time, so that sidr can
   correctly replicate the 3 elements before deleting them (if)
 *     ```
       <script>
       if ( document.getElementById('sidr') ) {
         document.getElementById('sidr-close').remove();
         document.getElementById('mobile-nav').remove();
       /* Only if search menu is active */
         document.getElementById('mobile-menu-search').remove();
       }
       </script>
       ```
   
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/why-twice-sidr-elements/#post-12506040)
 * Hello,
 * It seems you have found a solution. Let me know if you are still looking for 
   help.
 *  [hellowords](https://wordpress.org/support/users/hellowords/)
 * (@hellowords)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/why-twice-sidr-elements/#post-12510488)
 * Hello could anyone help me out i am getting my blog content twice.
    One time 
   above the header and one time on main post please help: [https://jamiapapers.com/how-to-crack-neet-entrance-exam-by-self-study/](https://jamiapapers.com/how-to-crack-neet-entrance-exam-by-self-study/)
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/why-twice-sidr-elements/#post-12510601)
 * [@hellowords](https://wordpress.org/support/users/hellowords/) you are using 
   a different theme so please contact the related theme support. We provide support
   only for the oceanwp theme here.

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

The topic ‘why twice sidr elements?’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.6/screenshot.png)
 * OceanWP
 * [Support Threads](https://wordpress.org/support/theme/oceanwp/)
 * [Active Topics](https://wordpress.org/support/theme/oceanwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/oceanwp/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/oceanwp/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/why-twice-sidr-elements/#post-12510601)
 * Status: resolved