Title: Hide div in amp?
Last modified: January 17, 2017

---

# Hide div in amp?

 *  Resolved [mrboats](https://wordpress.org/support/users/wpseiskaadmin/)
 * (@wpseiskaadmin)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/)
 * Talked to the map developer about amp but no resolution at this time. I was thinking
   about a workaround to ensure that the amp version of the post with a map on is
   not corrupted. Could I solve the problem by putting a div around the map and 
   related stuff and then somehow hide the full div on amp pages? Something like
 *     ```
       <div id="hideinamp">
       [map shortcode]
       </div>
       ```
   
 * and then hide the full div in amp? Pretty noob with jsarcpt, functions and stuff,
   what would it take to cleanly hide the div?

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

 *  [Khaled](https://wordpress.org/support/users/azmak/)
 * (@azmak)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/#post-8667465)
 * Hey [@wpseiskaadmin](https://wordpress.org/support/users/wpseiskaadmin/)
 * Thanx for using our plugin 🙂
 * am curious why you want to hide the map (a URL or screenshot would really help
   us understand)
 * is the short code causing any validation errors in amp page ?
 * Regards
    AzMak
 *  Thread Starter [mrboats](https://wordpress.org/support/users/wpseiskaadmin/)
 * (@wpseiskaadmin)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/#post-8667506)
 * The reason is that the map in the post ends up looking like this: [https://www.dropbox.com/s/q8xftg3oloxc1ej/map%20in%20amp.JPG?dl=0](https://www.dropbox.com/s/q8xftg3oloxc1ej/map%20in%20amp.JPG?dl=0)
 *  [Khaled](https://wordpress.org/support/users/azmak/)
 * (@azmak)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/#post-8667553)
 * Hey [@wpseiskaadmin](https://wordpress.org/support/users/wpseiskaadmin/)
 * apart from the issue in the image is there any validation issue for the page?
 * you can add the div and add the following code in posts
 *     ```
       <div class="hideinamp">
       [map shortcode]
       </div>
       ```
   
 * and also add these lines of code in custom CSS section of our plugin: [http://take.ms/oAYhj](http://take.ms/oAYhj)
 *     ```
       .hideinamp {
         display: none;
       }
       ```
   
 *  Thread Starter [mrboats](https://wordpress.org/support/users/wpseiskaadmin/)
 * (@wpseiskaadmin)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/#post-8667655)
 * This is from the Chrome console:
 *     ```
       Uncaught (in promise) Error: amp-iframe is already registered. The script tag for amp-iframe is likely included twice in the page.​​​
           at ka.f.assert (log.js:285)
           at pf (custom-element.js:114)
           at Ui (custom-element.js:108)
           at Ri (runtime.js:410)
           at f (amp-iframe.js:575)
           at extensions-impl.js:202
           at wa (dom.js:41)
           at xa (dom.js:87)
           at c (dom.js:86)
           at Ce (chunk.js:165)
       log.js:285Uncaught (in promise) Error: amp-sidebar is already registered. The script tag for amp-sidebar is likely included twice in the page.​​​
           at ka.f.assert (log.js:285)
           at pf (custom-element.js:114)
           at Ui (custom-element.js:108)
           at runtime.js:407
           at id (style-installer.js:59)
           at Ri (style-installer.js:45)
           at f (amp-sidebar.js:327)
           at extensions-impl.js:202
           at wa (dom.js:41)
           at xa (dom.js:87)
       log.js:285Uncaught (in promise) Error: amp-user-notification is already registered. The script tag for amp-user-notification is likely included twice in the page.​​​
           at ka.f.assert (log.js:285)
           at pf (custom-element.js:114)
           at Ui (custom-element.js:108)
           at runtime.js:407
           at id (style-installer.js:59)
           at Ri (style-installer.js:45)
           at f (amp-user-notification.js:457)
           at extensions-impl.js:202
           at wa (dom.js:41)
           at xa (dom.js:87)
       log.js:285Uncaught (in promise) Error: amp-social-share is already registered. The script tag for amp-social-share is likely included twice in the page.​​​
           at ka.f.assert (log.js:285)
           at pf (custom-element.js:114)
           at Ui (custom-element.js:108)
           at runtime.js:407
           at id (style-installer.js:59)
           at Ri (style-installer.js:45)
           at f (amp-social-share.js:96)
           at extensions-impl.js:202
           at wa (dom.js:41)
           at xa (dom.js:87)
       log.js:285Uncaught (in promise) Error: amp-analytics is already registered. The script tag for amp-analytics is likely included twice in the page.​​​
           at ka.f.assert (log.js:285)
           at pf (custom-element.js:114)
           at Ui (custom-element.js:108)
           at Ri (runtime.js:410)
           at f (amp-analytics.js:670)
           at extensions-impl.js:202
           at wa (dom.js:41)
           at xa (dom.js:87)
           at c (dom.js:86)
           at Ce (chunk.js:165)
       ```
   
 *  Thread Starter [mrboats](https://wordpress.org/support/users/wpseiskaadmin/)
 * (@wpseiskaadmin)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/#post-8667678)
 * The solution to hide the map worked OK, thanks!
 *  Thread Starter [mrboats](https://wordpress.org/support/users/wpseiskaadmin/)
 * (@wpseiskaadmin)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/#post-8667681)
 * And also made the errors go away.
 *  [Khaled](https://wordpress.org/support/users/azmak/)
 * (@azmak)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/#post-8667702)
 * Hey [@wpseiskaadmin](https://wordpress.org/support/users/wpseiskaadmin/)
 * I am happy that I could be of help 🙂
 * If you like our plugin, please leave us a review
 * Regards
    AzMak
 *  Thread Starter [mrboats](https://wordpress.org/support/users/wpseiskaadmin/)
 * (@wpseiskaadmin)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/#post-8667721)
 * When I can actually put it on the production site, I’ll be happy to do so, not
   quite there yet 🙂

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

The topic ‘Hide div in amp?’ is closed to new replies.

 * ![](https://ps.w.org/accelerated-mobile-pages/assets/icon-256x256.png?rev=1693616)
 * [AMP for WP - Accelerated Mobile Pages](https://wordpress.org/plugins/accelerated-mobile-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accelerated-mobile-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accelerated-mobile-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [mrboats](https://wordpress.org/support/users/wpseiskaadmin/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/hide-div-in-amp/#post-8667721)
 * Status: resolved