We have an event going on today and I'm trying to embed a twitter widget into a blog post.
The code I trying to embed is this:
When I save the post, what i'm supposed to see does not show up, even after refreshing the page. I then go to edit the post and what I want (sometimes) is visible in the WSYIWYG edit plane. But if I save again, it doesn't show in the actual post. If I then switch the editor to source mode. I see the HTML has changed to this:
So what's going on and how do I get it to work? Why does it only work momentarily in the editor?
Thanks.
- - - Updated - - -
Still curious if someone knows why vB rewrites the HTML like that. At any rate, I got it to work by putting the code in an html file hosted on my site and using an iframe to call it.
You can see the result here: http://www.teslamotorsclub.com/entry...-quot-Roadtrip
The code I trying to embed is this:
HTML Code:
<a class="twitter-timeline" href="https://twitter.com/TeslaRoadTrip" data-widget-id="302689062492438528">Tweets by @TeslaRoadTrip</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
HTML Code:
<iframe id="twitter-widget-0" class="twitter-timeline twitter-timeline-rendered" scrolling="no" frameborder="0" allowtransparency="true" style="border: none; max-width: 100%; min-width: 220px;" title="Twitter Timeline Widget" width="520" height="400"></iframe> <script id="twitter-wjs" src="//platform.twitter.com/widgets.js"></script><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Thanks.
- - - Updated - - -
Still curious if someone knows why vB rewrites the HTML like that. At any rate, I got it to work by putting the code in an html file hosted on my site and using an iframe to call it.
You can see the result here: http://www.teslamotorsclub.com/entry...-quot-Roadtrip
Comment