Replacing HTML Link with a Shortcode.
-
Hello everyone,
Got my WP website running a few days ago and currently working out a few last tweaks. Searched for about 3 hours now and decided to come for help here.
So.. What am I trying to do?
I have a button which is currently linked to a YouTube page. I wish for that youtube page to open up on my website kind of like a popup window.(I want the background dimmed and video put in the middle of my site and autoplay upon click of that button)
I have found a Plug in and created a shortcode (Youtube Fancy Box).
By inspecting the code element of a button I wish to replace the reference with a shortcode.
Original code on the page:
<div class="bottom_tagline_button"> <a href="https://www.youtube.com/watch?v=xxxxxxxx">Click ME</a> </div>This is what I tried replacing it with but it didn’t work…
<div class="bottom_tagline_button"> <?php echo do_shortcode('[youtube videoid="3we5z1xzSAE" height="0" width="0"]'); ?> </div>Could anyone help me out or at least consult me on this matter?
Highly appreciate your help!
Thanks all in advance!!
The topic ‘Replacing HTML Link with a Shortcode.’ is closed to new replies.