Skip to content

Instantly share code, notes, and snippets.

@badah
Created July 12, 2015 19:09
Show Gist options
  • Select an option

  • Save badah/e472f34b5cafedac79ef to your computer and use it in GitHub Desktop.

Select an option

Save badah/e472f34b5cafedac79ef to your computer and use it in GitHub Desktop.
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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment