Site logo

[Support request] How to add embedded form at bottom of existing posts

Home Forums Support [Support request] How to add embedded form at bottom of existing posts

Home Forums Support How to add embedded form at bottom of existing posts

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1710121
    Colin

    Hi, I think this might be out-of-scope for your support, in which case please do tell me (or just ignore!).

    How do I easily add an embedded sign-up form at the bottom of my existing posts? I can get the embedded form code no problem, but I can’t work out how I can add it to the bottom of all my existing posts (without manually adding to the bottom of each one).

    Any suggestions appreciated! Thanks.

    #1710208
    Elvin
    Staff
    Customer Support

    Hi there,

    Are you trying to embed the form on ALL posts? Do you have the code for the form?

    If so, you can use the Hook Element to insert your form after the post content.
    https://docs.generatepress.com/article/hooks-element-overview/

    Here’s how:
    1.) Make sure the Elements module is activated in Appearance > GeneratePress
    2.) Once activated, go to Appearance > Elements
    3.) Click Add New Element button on the upper left corner, a dropdown should pop up. Pick “Hook”.
    4.) Once you’re on the Hook Element UI, paste your form’s code on the code area. If it’s a PHP code, make sure you check “Execute PHP”. If it’s a shortcode, check “Execute Shortcode”
    5.) Set the hook dropdown to generate_after_content
    6.) Go to the Display rule tab.
    7.) Set the Location dropdown to “Post – all posts”
    8.) Save or update it.

    If you’ve successfully followed these steps, you should see the form on the bottom of the posts.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.