do_shortcode() question!
-
Hello guys!
First of all I’m a total beginner ! I have two weeks with wordpress and the same with PHP and HTML.
So pretty much this code was totally made with effort and trying and not much of a technique so I’m sorry if it doesn’t follow the best practices but somehow it’s starting to work.
I’m trying to create a library so I can easily hook up images and tooltips in diverse pages and in case I want to edit the tooltip of them all, I can do that in a single place and affect all.
function test_shortcode(){ $content = ' [simple_tooltip content="<strong>Marca Superior de Dano de Ataque:</strong><br /> Nível: <span style="color: #00ff00">20</span><br /> <span style="color: #ff0000;">+0.95</span> de Dano de Ataque"] <img src="http://leagueoflegendsbrasil.com/wp-content/uploads/2014/11/runaataque.png" alt="leagueoflegends" width="50" height="50" /> [/simple_tooltip]'; echo do_shortcode($content); } add_shortcode('test', 'test_shortcode');The problem is that the the image is being showed two times and also the colors from the span style are not working.
Any hint how to fix that?
Thanks in advance
The topic ‘do_shortcode() question!’ is closed to new replies.