badah
7/12/2015 - 7:09 PM

Wordpress: render shortcode in proper place

Wordpress: render shortcode in proper place

// Use the following snipet to render shortcode proper in a Wordpress theme

function myfunction_func() {
	// code goes here
}

function myfunction_func_buffer() {

	ob_start();
	myfunction_func();
	$myfunction_func = ob_get_clean();
	return $myfunction_func;
}

add_shortcode('valor-pagamento', 'myfunction_func');