• Resolved christiaanvaken

    (@christiaanvaken)


    I am trying to put a shortcode of a snippet within another snippet, but it does not seem to work:

    $html = ‘[CP_CALCULATED_FIELDS_RESULT_LIST formid=”‘.$result->formid.'” submission=”‘.$result->id.'”][wbcr_snippet id=”7333″][/CP_CALCULATED_FIELDS_RESULT_LIST]’;
    echo do_shortcode($html);

    The above PHP snippet is called from a page and I would like to have an universal snippet included with the PHP snippet.

    Any suggestions?

Viewing 1 replies (of 1 total)
  • Hello!

    Try this code, please.

    $html = ‘[CP_CALCULATED_FIELDS_RESULT_LIST formid=”‘.$result->formid.’” submission=”‘.$result->id.’”]do_shortcode(‘[wbcr_snippet id=”7333″]’)[/CP_CALCULATED_FIELDS_RESULT_LIST]’;
    echo do_shortcode($html);

    Tell us about the result.

    [ Signature deleted ]

    • This reply was modified 6 years, 11 months ago by Temyk.
    • This reply was modified 6 years, 11 months ago by Jan Dembowski.
Viewing 1 replies (of 1 total)

The topic ‘Shortcode to snippet within snippet’ is closed to new replies.