In below example, I wrapped Error: Contact form not found.
inside another shortcode [myform]
. So, when posting, just use [myform]
istead:
function wrapthecode() {
return do_shortcode('Error: Contact form not found.
');
}
add_shortcode( 'myform', 'wrapthecode' );
But how to append variable ID on the new shortcode?
Means Error: Contact form not found. Error: Contact form not found.[myform id="33"]
is
and [myform id="34"]
is