Answers for "php do_shortcode contact form 7"

PHP
8

php to shortcode

echo do_shortcode('[name_of_shortcode]');
Posted by: Guest on June-17-2020
0

add custom shortcode in contact form 7

wpcf7_add_shortcode('custom_date', 'wpcf7_custom_date_shortcode_handler', true);

function wpcf7_custom_date_shortcode_handler($tag) {
    if (!is_array($tag)) return '';

    $name = $tag['name'];
    if (empty($name)) return '';

    $next_week = date('Y-m-d', time() + (60*60*24*7)); 
    $html = '<input type="hidden" name="' . $name . '" value="' . $next_week . '" />';
    return $html;
}
Posted by: Guest on December-23-2021

Code answers related to "php do_shortcode contact form 7"

Browse Popular Code Answers by Language