Answers for "how to write shortcode in function php file in wordpress"

PHP
1

shortcode php wordpress

// function that runs when shortcode is called
function wpb_demo_shortcode() { 
 
// Things that you want to do. 
$message = 'Hello world!'; 
 
// Output needs to be return
return $message;
} 
// register shortcode
add_shortcode('greeting', 'wpb_demo_shortcode');
Posted by: Guest on March-18-2020
0

php shortcode wordpress return content with shortcodes

return do_shortcode($content);
Posted by: Guest on September-30-2020

Code answers related to "how to write shortcode in function php file in wordpress"

Browse Popular Code Answers by Language