我们如何使用$username
在shorcode怎样才能获得用户名到一个简码
<?php echo do_shortcode('[education="$username"]'); ?>
但它不工作
我有一个简码为[education="username"]
。它的工作原理手动[education="john-doe"]
我想进入名简码我的用户资料页面
<?php echo do_shortcode("[education="username"]"); ?>
上,但它不工作。我错过了什么?
php 101 - '''''引用的字符串不会插入变量。你正在发送一个'''','u','s'等字符到短代码函数。 –
谢谢马克B ... – iberx