• Resolved Wendihihihi

    (@wendihihihi)


    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

    (@gripgrip)

    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

    (@wendihihihi)

    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

    (@gripgrip)

    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

    (@wendihihihi)

    The way you describe it, it should work.

    I’ve enabled a logic for this 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 2 years, 4 months ago by Wendihihihi.
    Plugin Author Mircea Sandu

    (@gripgrip)

    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” 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 2 years, 4 months ago by Mircea Sandu. Reason: Saw the edit for the reply later
    Thread Starter Wendihihihi

    (@wendihihihi)

    Thank you for looking into it.

    The single.php contains <?php the_content(); ?>

    Plugin Author Mircea Sandu

    (@gripgrip)

    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

    (@wendihihihi)

    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

    (@wendihihihi)

    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

    (@gripgrip)

    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

    (@wendihihihi)

    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

    (@gripgrip)

    Hi @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

    (@wendihihihi)

    That would be great, Mircea. The plugin looks good, and I will use it on all my sites.

    Thank you.

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @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

    (@wendihihihi)

    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.