How can I create a function to change the video id for youtube vid?
-
I have a Youtube code like below set in my index:
<object type="application/x-shockwave-flash" style="width:533px; height:325px;" data="https://www.youtube.com/v/xzBV2ZvQfQw?fs=1"><param name="movie" value="https://www.youtube.com/v/xzBV2ZvQfQw?fs=1" /><param name="allowFullScreen" value="true" /></object>
Essentially, what I’d like to do is create some sort of function that shows a section for “VIDEO ID” in the WordPress dashboard so the user can input the video ID from the dashboard and have it display on the site. In the above case, that ID would be xzBV2ZvQfQw.
Is there a way to achieve this? If not, is there an easier way rather than having the client edit the template manually every time he wants to change the video?
- The topic ‘How can I create a function to change the video id for youtube vid?’ is closed to new replies.