Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何包括<;?php echo$page&燃气轮机;wordpress中的内部联系人表格7电子邮件_Php_Wordpress_Html Email_Shortcode_Contact Form 7 - Fatal编程技术网

如何包括<;?php echo$page&燃气轮机;wordpress中的内部联系人表格7电子邮件

如何包括<;?php echo$page&燃气轮机;wordpress中的内部联系人表格7电子邮件,php,wordpress,html-email,shortcode,contact-form-7,Php,Wordpress,Html Email,Shortcode,Contact Form 7,如何在wordpress中的联系人表单7中动态包含页面的名称?我将代码放入“functions.php”中,但它不起作用 function cs7() { $var='<?php echo $page; ?>'; $html='<p>'.$var.'</p>'; return $html; } add_shortcode('cs7', 'cs7'); 函数cs7(){ $var=''; $html=''.$var.'; 返回$html; }

如何在wordpress中的联系人表单7中动态包含页面的名称?我将代码放入“functions.php”中,但它不起作用

function cs7() {
  $var='<?php echo $page; ?>';
  $html='<p>'.$var.'</p>';
  return $html;
}

 add_shortcode('cs7', 'cs7');
函数cs7(){
$var='';
$html=''.$var.

'; 返回$html; } 添加_短代码('cs7','cs7');
您可以使用CF7特殊邮件标签来显示表单在邮件内容中提交的页面或帖子标题

[_post_title]

更多信息

您已经在一个php块中,不要打开一个新块。另外,
$page
超出了功能范围。我已更正此问题,但stll不起作用。在我的联系人表单中,我看到[cs7]这个短代码不起作用。显示您现在正在尝试的代码。函数cs7(){$var=$page;$html=''.$var.

';return$html;}添加_短代码('cs7','cs7')$页面仍在功能范围之外。