Skip to content

Instantly share code, notes, and snippets.

@erezLieberman
Last active November 9, 2015 12:28
Show Gist options
  • Save erezLieberman/5920853b919bdf19a20b to your computer and use it in GitHub Desktop.
Save erezLieberman/5920853b919bdf19a20b to your computer and use it in GitHub Desktop.
add wp shortcode code apper in place
<?php
function shortcode_function_name() {
ob_start();
// Code
...youre php/html code
$content = ob_get_clean();
return $content;
}
add_shortcode( 'shortcode_name', 'shortcode_function_name' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment