Answers for "widget shortcode wp php"

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

show widget using the shortcode from php

echo do_shortcode( '[contact-form-7 id="91" title="quote"]' );
Posted by: Guest on February-18-2021

Browse Popular Code Answers by Language