Title: Before Post Code Shown Twice &amp; Inserted In Embedded Links
Last modified: February 2, 2018

---

# Before Post Code Shown Twice & Inserted In Embedded Links

 *  Resolved [annaef1991](https://wordpress.org/support/users/annaef1991/)
 * (@annaef1991)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/before-post-code-shown-twice-inserted-in-embedded-links/)
 * Hi there,
 * The plugin has worked fine so far for me. I only have one issue. I’ve enabled
   a code block Before Post which works well. However, it seems that every time 
   I try to embed a link in a post, the Before Post code block is called again. 
   As a result, there is a blank space above the embedded link, both in the CMS 
   editor and in the front end article.
 * Here is a link with the problem (embedded link is at the end of the post).
    [https://www.mamapeinao.gr/amita-apo-agapi/](https://www.mamapeinao.gr/amita-apo-agapi/)
 * I used the Label Blocks feature and right above the embedded link I see this:
   
   BEFORE POST [AI]4 Block 4 B=1 N=1[/AI]
 * I’ve already set the Misc>Max N Insertion=1, Filter insertion=1 and disabled 
   caching for this code block. It didn’t work.
 * This has been happening since the two previous WordPress versions, but I just
   realized it was the plugin code block that caused this.
 * Thank you in advance.
 * Regards,
    Anna
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbefore-post-code-shown-twice-inserted-in-embedded-links%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/before-post-code-shown-twice-inserted-in-embedded-links/#post-9930140)
 * On that page each code block is inserted only once.
 *     ```
       BLOCK  2 INSERTED 
       BLOCK  3 INSERTED 
       BLOCK  4 INSERTED 
       ```
   
 * However, below post content you have iframe which inserts page
    `https://www.
   mamapeinao.gr/amita-apo-agapi/embed/#?secret=tQHd9nmwnP`
 * This page has block 4 inserted before post (as configured).
    Consequently, you
   see code block 4 twice.
 * To prevent insertion of code block on such (embedded) pages black-list url
    `*/
   embed/*` [https://adinserter.pro/lists](https://adinserter.pro/lists)
 *  Thread Starter [annaef1991](https://wordpress.org/support/users/annaef1991/)
 * (@annaef1991)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/before-post-code-shown-twice-inserted-in-embedded-links/#post-9930299)
 * Thank you for the immediate response. It worked like a charm.
    Best, Anna
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/before-post-code-shown-twice-inserted-in-embedded-links/#post-9930303)
 * 🙂
 * > It worked like a charm.
 * Please say it here:
    [https://wordpress.org/support/plugin/ad-inserter/reviews/](https://wordpress.org/support/plugin/ad-inserter/reviews/)
 * Thank you,
    Igor

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

The topic ‘Before Post Code Shown Twice & Inserted In Embedded Links’ 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/)

## Tags

 * [insertion](https://wordpress.org/support/topic-tag/insertion/)

 * 3 replies
 * 2 participants
 * Last reply from: [Spacetime](https://wordpress.org/support/users/spacetime/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/before-post-code-shown-twice-inserted-in-embedded-links/#post-9930303)
 * Status: resolved