Skip to content

Instantly share code, notes, and snippets.

@Dianakc
Last active December 16, 2015 02:09
Show Gist options
  • Save Dianakc/914ec85cd3c5d06fe429 to your computer and use it in GitHub Desktop.
Save Dianakc/914ec85cd3c5d06fe429 to your computer and use it in GitHub Desktop.
Permite usar dynamic_sidebar em shortcodes, para isso seu conteúdo deve ser atribuido a uma variável
<?php
function shortcoding_for_sidebar( $atts ) {
ob_start();
dynamic_sidebar('sidecode');
$html = ob_get_contents();
ob_end_clean();
//return $html;
}
;?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment