[Resolved] Inserting shortcode inside html (elements)

Home Forums Support [Resolved] Inserting shortcode inside html (elements)

Home Forums Support Inserting shortcode inside html (elements)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #979579
    g_younes

    Hello, I am just a bit confused as to how to add a shortcode inside HTML.
    I am creating a custom footer through hooks in elements, and I want to place a form inside it from WPforms.
    How am I supposed to add the shortcode inside the HTML? The online suggestions either say I should add the shortcode inside the page/post text (don’t work in this case), or they provide a PHP suggestion (don’t work in this case either as I am not dealing with template files).

    Thank you.

    #979663
    David
    Staff
    Customer Support

    Hi there,

    is the shortcode not working at all? Or is it being output outside of the HTML?

    Have you tried:

    <?php echo do_shortcode("[the-shortcode]"); ?>

    #979691
    g_younes

    I just realized there are “execute shortcodes” and “execute PHP” options inside elements below the HTML section. I had totally missed them at first. Just now I checked them both and the shortcode worked. Thank you!

    #979717
    David
    Staff
    Customer Support

    Aah yes 🙂 Glad you got it resolved

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