Custom Fields
Re-Envisioned
Support General WYSWIYG field - Render Contact Form 7 Shortcode on Front End

  • Creator
    Topic
  • #29133
    Resolved Dragan Marian
    Participant

    Hi Guys

    I have created "WYSWIYG Editor" custom field. I have placed a contact form 7 shortcode in my WYSWIYG custom field but the contact form is not rendered, only the shortcode [contact-form-7 ..... ].

    I have tried to use a function in my functions.php but I'm not sure I got it right.

    function render_shortcode() {
    $text = rwmb_meta( 'my WYSWIYG ID' );
    echo do_shortcode( wpautop( $text ) );
    }

    Sincerely

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #29144
    Long Nguyen
    Moderator

    Hi,

    You can use that way to render a shortcode in the WYSIWYG value or use the helper shortcode to render it

    [rwmb_meta id="wysiwyg-field-id"]

    #29147
    Dragan Marian
    Participant

    Thank You 🙂

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