如何包含<?php echo $ page; ?> wordpress中的内部联系表单7电子邮件
问题描述:
How I can include dynamically name of page <?php echo $page; ?>
inside contact form 7 in wordpress? I put code into "functions.php" but it is not working.
function cs7() {
$var='<?php echo $page; ?>';
$html='<p>'.$var.'</p>';
return $html;
}
add_shortcode('cs7', 'cs7');
答
You can use CF7 special Mail tag to display page or post title from which the form submitted in the mail content.
[_post_title]
More info here