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 www.wpbeginner.com #
 
PREVIOUS NEXT
Tagged: #wordpress #shortcode
ADD COMMENT
Topic
Name
7+4 =