2016-04-22 87 views
0
<img src="<?php echo $newurl; ?>" alt="01-slide-Eurasia" width="120" height="90" /> 


<?php echo do_shortcode('[simple_tooltip content="Click Now to Download"]' . $f . '[/simple_tooltip]'); ?> 

嵌入PHP简码我需要$f需要替换<img src="<?php echo $newurl; ?>" alt="01-slide-Eurasia" width="120" height="90" />在WordPress模板

我试过,但得到的错误。请帮助

回答

0

php变量不能在字符串中被回显,而是连接在一起。

<?php echo do_shortcode('[simple_tooltip content="Click Now to Download"]<img src="'.$newurl.'" alt="01-slide-Eurasia" width="120" height="90" />[/simple_tooltip]'); ?> 
+0

非常感谢你 –