Title: Code implemented twice
Last modified: January 10, 2018

---

# Code implemented twice

 *  Resolved [Pradeep Augustine](https://wordpress.org/support/users/praderj/)
 * (@praderj)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-implemented-twice/)
 * Hello,
 * I have been using Adinserter from the moment I stated blogging. It is a very 
   nice plugin that comes with almost all the option I need. Thanks for that. My
   theme Newspaper by tagdiv provides a separate Mobile theme, which when activated
   is having trouble with the adinserter. When the auto insertion is on, in pages,
   the adinserter plugin inserts the code twice. So I’m seeing 2 ads one after the
   other. But in the desktop version it seems ok. Only one ad. Kindly look into 
   it. Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcode-implemented-twice%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-implemented-twice/#post-9849995)
 * Please enable remote debugging , list code blocks that are inserted twice and
   pages where it happens.
    [https://wordpress.org/support/topic/ad-inserter-support-how-to-ask-for-help/](https://wordpress.org/support/topic/ad-inserter-support-how-to-ask-for-help/)
 *  Thread Starter [Pradeep Augustine](https://wordpress.org/support/users/praderj/)
 * (@praderj)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-implemented-twice/#post-9850065)
 * Thank you for the quick response. I have enabled remote debugging. The ad Appears
   on the page [https://www.catholicgallery.org/mass-readings-today-drb/](https://www.catholicgallery.org/mass-readings-today-drb/).
   This happens only in the mobile version not in the desktop version. The code 
   block that is inserted twice is no 4, which is set to insert only on selected
   pages. It happens with other code blocks also when auto insertion is enabled 
   in pages not the posts. All the posts seems to be working fine.
 * Thanks.
    -  This reply was modified 8 years, 5 months ago by [Pradeep Augustine](https://wordpress.org/support/users/praderj/).
    -  This reply was modified 8 years, 5 months ago by [Pradeep Augustine](https://wordpress.org/support/users/praderj/).
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-implemented-twice/#post-9850186)
 * It seems the plugin inserts it only once. This is the insertion log:
 *     ```
         24  CONTENT HOOK START [1]
          1  <div ....  [842]
          0  BLOCK 2 FAILED CHECK: INDIVIDUALLY ENABLED
          0  BLOCK 3 FAILED CHECK: INDIVIDUALLY ENABLED
         18  BLOCK 4 INSERTION POSITIONS: 11
          0  BLOCK 4 INSERTED
          0  BLOCK 6 FAILED CHECK: INDIVIDUALLY ENABLED
          0  CONTENT HOOK END
   
       INSERTION SUMMARY
       ======================================
       BLOCK  2 FAILED CHECK: INDIVIDUALLY ENABLED 
       BLOCK  3 FAILED CHECK: INDIVIDUALLY ENABLED 
       BLOCK  4 INSERTED 
       BLOCK  5 INSERTED 
       BLOCK  6 FAILED CHECK: INDIVIDUALLY ENABLED 
       BLOCK  7 INSERTED 
       BLOCK 13 INSERTED 
       BLOCK 14 INSERTED 
       BLOCK 16 INSERTED 
       ```
   
 * I suggest to check with the theme author.
 *  Thread Starter [Pradeep Augustine](https://wordpress.org/support/users/praderj/)
 * (@praderj)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-implemented-twice/#post-9850230)
 * Thank you. But when I load the desktop version of my site everything works fine.
   This happens only when I load the mobile version. The same block is inserted 
   twice with the info C=2 N= 2 and the other one C = 1 N = 1. I will contact the
   theme Author if it is not the plugin. Thank you for the Suggestions and helps.
   For the time being I fixed this using the option available in the Plugin in Misc
   section. I set the maximum insertion to 1 and now it displays one ad.
    -  This reply was modified 8 years, 5 months ago by [Pradeep Augustine](https://wordpress.org/support/users/praderj/).
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-implemented-twice/#post-9850281)
 * Strange.
    Then the plugin is indeed called twice. If it is called twice then 
   it insert twice.
 * Nevertheless, set Max insertions to 1:
    Button Misc, tab Insertions [https://adinserter.pro/documentation#misc](https://adinserter.pro/documentation#misc)
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-implemented-twice/#post-9852997)
 * >  It is a very nice plugin that comes with almost all the option I need
 * Please say it here:
    [https://wordpress.org/support/plugin/ad-inserter/reviews/](https://wordpress.org/support/plugin/ad-inserter/reviews/)
 * Thank you,
    Igor

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

The topic ‘Code implemented twice’ is closed to new replies.

 * ![](https://ps.w.org/ad-inserter/assets/icon-256x256.jpg?rev=1502039)
 * [Ad Inserter - Ad Manager & AdSense Ads](https://wordpress.org/plugins/ad-inserter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ad-inserter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ad-inserter/)
 * [Active Topics](https://wordpress.org/support/plugin/ad-inserter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ad-inserter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ad-inserter/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Spacetime](https://wordpress.org/support/users/spacetime/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/code-implemented-twice/#post-9852997)
 * Status: resolved