Title: Insert code after 1st paragraph posts
Last modified: July 20, 2022

---

# Insert code after 1st paragraph posts

 *  Resolved [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * (@wendihihihi)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/)
 * Thought I would test this sample snippet.
 * I put the snippet on Active
    Auto Insert Enable Logic -> Logged in is true.
 * The text didn’t show up on the page while I am logged in and cleared the site’s
   cache.
 * Am I missing something?

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

 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15840962)
 * Hi there,
 * That depends on the content of the page on which you are looking for the text.
   The text will show up after the 1st paragraph of single pages/posts but only 
   if the content is in a standard WordPress format of text and uses paragraphs.
 * Can you please check if the snippet text shows up on single posts? (if you have
   any on the site).
 *  Thread Starter [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * (@wendihihihi)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15840992)
 * Could you explain a bit more about a standard WordPress format? In the Editor
   the text is not wrapped p elements but in the source code the first paragraph
   is wrapped in p elements.
 * I use the more tag. Maybe that causes it?
 * btw there is only 1 paragraph, the rest is wrapped in divs, ul, and ol.
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15841591)
 * The more tag shouldn’t interfere with this functionality – by standard format
   I mean the content being text not using a page builder, for example, which might
   not have any paragraphs in the output.
    The way the auto-insert works is that
   it looks for the paragraph with the count set in the field below so in this case
   the text should show up under your first paragraph from what you are describing.
   Would it be possible to share a link to a page where the snippet should show 
   up?
 * Thanks
 *  Thread Starter [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * (@wendihihihi)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15841644)
 * The way you describe it, it should work.
 * I’ve enabled a logic for [this](https://www.temporary-url.com/7FF9E) page url
   only.
 * btw what’s at the beginning in the editor is something like this
 *     ```
       Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer vitae interdum nibh. Quisque lobortis velit sit amet diam euismod fringilla. Morbi eget orci orci. Sed vitae lorem tempor ligula egestas dictum non sit amet lacus. Sed suscipit tortor non est consectetur, non scelerisque est scelerisque. Nunc malesuada non metus sed pellentesque.
       <!--more-->
       <div class="recipe-meta">[shortcode1][shortcode2][shortcode3]</div>
       <div class="shortcode-ingredients">
       ```
   
    -  This reply was modified 3 years, 10 months ago by [Wendihihihi](https://wordpress.org/support/users/wendihihihi/).
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15841730)
 * Thank you for the example URL.
    If the content output there is going through “
   the_content” filter the snippet should show up right after the P tag but because
   you are using a custom theme it might be that the content there is output differently(
   not using the “[the_content](https://developer.wordpress.org/reference/functions/the_content/)”
   or similar).
 * Is it possible to look in the single.php file of your theme and check what function
   is used for the output in the “.entry-content” div?
    -  This reply was modified 3 years, 10 months ago by [Mircea Sandu](https://wordpress.org/support/users/gripgrip/).
      Reason: Saw the edit for the reply later
 *  Thread Starter [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * (@wendihihihi)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15841764)
 * Thank you for looking into it.
 * The single.php contains `<?php the_content(); ?>`
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15842047)
 * Thank you for the details, I can’t replicate the issue on our side – I have been
   trying with similar content as the one you have on the site and the snippet gets
   added correctly.
 * Can you please try using the “Insert After Post” or “Insert After Content” locations
   to rule out/confirm an issue specific to the paragraph one?
 * Thank you
 *  Thread Starter [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * (@wendihihihi)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15842180)
 * Hi,
 * I just tried it on another website. Same thing. Then I tried it with the Twenty
   Twenty-Two theme, but it was still the same.
 * I tried the shortcode directly in the Editor, which posted the text line. Even
   when the Edit Snippet was Inactive…(?).
 * I think the problem is the Logic. I use the show This code snippet if the page
   URL is the page. Then it doesn’t show up. When I disable the Logic, the text 
   shows up.
 * I have to go now, but if you want me to do more tests, just let me know.
 *  Thread Starter [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * (@wendihihihi)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15842245)
 * Can you please try using the “Insert After Post” or “Insert After Content” locations
   to rule out/confirm an issue specific to the paragraph one?
 * This worked as well
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15842395)
 * Thank you for testing the various options, yes, if you use the “Page URL [is]”
   operator the check is very strict so even a character difference will not match–
   I suggest using the “contains” operator and just using the page slug – that way
   it’s less strict but still precise.
 *  Thread Starter [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * (@wendihihihi)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15844392)
 * Thank you for the suggestion, but that also didn’t work. For “page URL is”, I
   copied and pasted it from the browser, so no typos.
 * All other options work; like logged-in, post type, and type of page, but not 
   page URL.
 * I used contains and picked one word from the URL, but it didn’t show up.
 * I used it on the Twenty Twenty-Two theme, clean htacccess, no firewall, no cache
   plugin installed.
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15846642)
 * Hi [@wendihihihi](https://wordpress.org/support/users/wendihihihi/),
 * I can confirm the page URL conditional rules don’t work as expected in some scenarios
   and we’ll get this fixed in the next release.
 * Thank you for testing this and providing all the details.
 *  Thread Starter [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * (@wendihihihi)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15848222)
 * That would be great, Mircea. The plugin looks good, and I will use it on all 
   my sites.
 * Thank you.
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15855814)
 * Hi [@wendihihihi](https://wordpress.org/support/users/wendihihihi/),
 * I just wanted to let you know we released an update that fixes the Page URL issue
   you ran into, please update when you get a chance and let us know if you run 
   into any other issues.
 * Thanks,
    Mircea
 *  Thread Starter [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * (@wendihihihi)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15855963)
 * I tried with page url contains and it’s working now.
 * Thanks

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

The topic ‘Insert code after 1st paragraph posts’ is closed to new replies.

 * ![](https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516)
 * [WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager](https://wordpress.org/plugins/insert-headers-and-footers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-headers-and-footers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-headers-and-footers/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/)

## Tags

 * [auto-insert](https://wordpress.org/support/topic-tag/auto-insert/)
 * [snippet](https://wordpress.org/support/topic-tag/snippet/)

 * 15 replies
 * 2 participants
 * Last reply from: [Wendihihihi](https://wordpress.org/support/users/wendihihihi/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/insert-code-after-1st-paragraph-posts/#post-15855963)
 * Status: resolved