Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
custom shortcode to insert javascript
// insert javascript into WordPress posts or popups
// use shortcode [wpp_insert]
add_shortcode( 'wpp_insert', 'wpp_insert_code' );
function wpp_insert_code() {
<!-- paste your html and javascript here -->
$html = ob_get_clean();
return $html;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment