Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @rayeason,

    I am not sure how your pages are set up but, from what I understand, the issue is that your snippet also gets inserted into the Easy Accordion output.

    Can you please share which auto-insert location you are using for this snippet?

    Thread Starter rayeason

    (@rayeason)

    Yes, that is correct.

    I am using the HTML Snippit and Auto Insert: Location – Insert After Paragraph – after paragraph number 12.

    https://drive.google.com/file/d/1LqYBClm_jZAhSECmPjNxwGzIRd6xDLom/view?usp=drivesdk

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @rayeason,

    Thank you for the details, in this case I am not sure if you can fully avoid this. The issue is that the insert after a number of paragraphs in WPCode goes through the content and tries to insert the snippet without breaking the existing HTML. If the FAQ section is at paragraph 12, the snippet might get inserted in it like you are experiencing.

    The conditional logic for post type will not work in this case, since the post type that it checks against is the one of the main post where the FAQ section is inserted.

    I suggest maybe trying to use the “Insert Before Paragraph” option or pick a different number – does that help?

    Thread Starter rayeason

    (@rayeason)

    Well the interesting thing is this: The Paragraph 12 works in the posts, but the FAQ’s do not have 12 paragraphs. This particular screenshot is showing the insertion after the second paragraph.

    For testing, I changed it to paragraph 11 and it moved it after the 1st paragraph.

    Then I moved it to paragraph 10 and it is no longer showing in the FAQ.

    Is it possible the plugin is only acknowleding the last digit (12 (2), 11 (1), 10 (not showing)?

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @rayeason,

    From what you are describing, this is happening because the FAQ is placed at Paragraph 10. The insertion does not happen 2 times, it’s only in the final form of the post which already contains the FAQ in this case.

    When the post where the FAQ is added is processed, WPCode looks for the paragraph with the number 12, which in this case is inside the FAQ.

    Thread Starter rayeason

    (@rayeason)

    Apologies for the delay.

    I thought I replied back to this.

    No, the insertion is not happening 2 times. That is not what I meant.

    What I meant is, I think it’s reading the second digit as the number of the paragraph insertion.

    So for paragraph 10, there is no issue. But for paragraph 11, 12, 13, it is inserting the snipping after paragraph 1, 2 and 3 respectively.

    The faqs do not have 11, 12 or 13 paragraphs.

    Blog posts do, but not the faqs.

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @rayeason,

    Yes, that’s exactly what I meant. The auto-insert functionality does not insert the code in your FAQ post, it inserts the code in your post. But, it inserts the code in your post after the FAQ content is rendered as part of the post. The FAQ is considered part of the post at the time when WPCode auto-inserts the snippet as it is already rendered.

    Thread Starter rayeason

    (@rayeason)

    I think I understand. The FAQ is on a page.

    So it is inserting the code after paragran 11,12, 13 on the Page?

    Plugin Author Mircea Sandu

    (@gripgrip)

    Yes, the auto-insert evaluates the page content and, the way the FAQ is inserted, the auto-insert function sees that as part of the content as it’s already rendered at that time.

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

The topic ‘HTML Code Snippit Showing in FAQ’ is closed to new replies.