wordpress短代码中的HTML中的PHP

wordpress短代码中的HTML中的PHP,php,html,wordpress,templates,shortcode,Php,Html,Wordpress,Templates,Shortcode,好的,基本上我是想包装 <a class="userpro-init-chat" href="#" data-chat_with="<?php echo get_the_author_meta('ID'); ?> " data-chat_from="<?php echo get_current_user_id();?>" >Reply to this ad!</a> 在模板中的wordpress短代码中。应该很简单吧 <?php ech

好的,基本上我是想包装

<a class="userpro-init-chat" href="#" data-chat_with="<?php echo get_the_author_meta('ID'); ?> " data-chat_from="<?php echo get_current_user_id();?>" >Reply to this ad!</a>

在模板中的wordpress短代码中。应该很简单吧

<?php echo  do_shortcode('[userpro_private]' <a class="userpro-init-chat" href="#" data-chat_with="<?php echo get_the_author_meta('ID'); ?> " data-chat_from="<?php echo get_current_user_id();?>" >Reply to this ad!</a> '[/userpro_private]'); ?>

然而,我不断收到错误“解析错误:语法错误,在第46行的/home/content/67/11982267/html/tester/wp content/themes/Twentylex/content.php中出现意外的T_类”

有人知道为什么吗

我是php新手,所以我可能在某个地方做错了什么,这对其他人来说是显而易见的,但我真的非常感谢任何人的帮助

非常感谢,,
詹姆斯

我希望这能解决问题

$text = "<a class='userpro-init-chat' href='#' data-chat_with='". get_the_author_meta('ID')."' data-chat_from= '".get_current_user_id()."' >Reply to this ad!</a>";

echo  do_shortcode('[userpro_private]'.$text.'[/userpro_private]'); 
$text=”“;
echo do_短码(“[userpro_private]”.$text.“[/userpro_private]”);