Created
June 2, 2017 15:12
-
-
Save ucheng/6ee59517f8789ed278bff1f7eee7c9f4 to your computer and use it in GitHub Desktop.
shortcode ob_start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_shortcode('prefix_shortcode', 'prefix_shortcode'); | |
function prefix_shortcode() { | |
ob_start(); | |
?> | |
//your html | |
<?php | |
$output_string = ob_get_contents(); | |
ob_end_clean(); | |
return $output_string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment