Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Embedding Twine Stories With Wordpress

My apologies if this has already been covered (though I searched for a while to check).

I've had a Twine story on a plain HTML page for a while. But I can't find a simple guide to embedding a Twine story on a Wordpress powered blog. I think a guide to this might be useful to the community at large (and, of course, to me. Selfishness.).

I have my own domain name, access to my file manager, etc. I've been using Twine 2.0 and it works great. But when I publish, I get stuck.

How would you make a Twine story work in Wordpress? Is it possible? Or a fool's errand? Thanks in advance.

Comments

  • Do you want the game to be 'inside' your site, with your header/sidebars etc still visible?
    Or do you simply want to be able to link to yoursite.com/yourgame.html? (because if that's the case, just uploading the yourgame.html file to your public_html folder will do the trick)
  • Thanks!

    Yesthe problem is that I want it to live in a post.
  • So no ideas on this?
  • My guess is that you will need to use an iFrame to display your Twine story within a Wordpress post.

    The problem is that the java-script and CSS code within your story knows about the structure of the generated HTML file and uses this knowledge to work, and by default when you embed HTML within a Workdpress post you change its structure. Wrapping the story HTML within an iFrame allows that structure to remain unchanged.

    From what I have read there are a couple of add-ons you can use to add iFrame support to Wordpress, though they each seem to have there limitations.
  • I'm going to mirror with greyelf's thoughts on this one.
    You'd be uploading the .html file as I mentioned before, then embedding it in to your post.
    Lots of things to consider re: css styling too.
  • Hey folks!

    I just wanted to check in and post the solution I ended up using. I'm not sure if this is the most efficient way, but it worked for me.

    I tried the iFrame thing and ran into issues with the window not resizing as the story changed. So instead, I used a custom field and included the story html there, with links to include the Javascript and CSS.

    It seems like different versions of Twine work pretty differently, so I have no idea how universal this solution is, especially with more complex stuff. But it worked for my little branching Twine story with Jonah.

    Anyone out there looking for the plugin should just search for Custom HTML pluginsthere's a lot out there (or you can make your own).
Sign In or Register to comment.