Created
November 18, 2019 02:04
-
-
Save redsoxfan2499/c0a33aa8fe3ccc355a0efd184d9ee61c to your computer and use it in GitHub Desktop.
WordPress Shortcode with Custom Action Hook
This file contains hidden or 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
function example_shortcode( $atts ) { | |
$shortcode_output = "<p>Some shortcode content.</p>"; | |
$shortcode_output .= "<p>More shortcode content.</p>"; | |
ob_start(); | |
do_action('below_shortcode'); | |
$below_shortcode = ob_get_contents(); | |
ob_end_clean(); | |
$shortcode_output .= $below_shortcode | |
return $shortcode_output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment