Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress shortcode

function wp_demo_shortcode() { 

//Turn on output buffering
ob_start();
$code = 'Hello World';
ob_get_clean();

 // Output needs to be return
return $code;
} 

// register shortcode
add_shortcode('helloworld', 'wp_demo_shortcode'); 
Source by winningwp.com #
 
PREVIOUS NEXT
Tagged: #wordpress #shortcode
ADD COMMENT
Topic
Name
5+4 =