Embedding a game into a wordpress site

Get help using Construct 2

Post » Thu Dec 15, 2011 9:00 am

So my group and I have decided to use wordpress for our website, and we want to have an HTML5 arcade section similar to what we have on this site. Does anyone know how I can embed my game directly into the site? As of right now all I can get it to do is to either open the game in a new tab (which works fine) or when it IS embedded, the game runs, but it won't load any of the images. Any ideas?
B
64
S
8
G
9
Posts: 290
Reputation: 8,590

Post » Thu Dec 15, 2011 12:12 pm

Try to add <iframe> tag in HTML code of your post/page. For instance, this is how it works fine for me:

<iframe src="http://dl.dropbox.com/u/99999999/xxx/index.html" width="320" height="480" style="margin-top: 15px; margin-bottom: 15px; width:320px; height:480px;" frameborder="0" id="MyGame" title="This is my HTML5 masterpiece"></iframe>
B
9
S
2
G
5
Posts: 26
Reputation: 3,219

Post » Thu Dec 15, 2011 9:13 pm

Too bad it doesn't work for me :(
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Fri Dec 16, 2011 2:30 am

thanks for the input, I'll give it a try
B
64
S
8
G
9
Posts: 290
Reputation: 8,590

Post » Fri Dec 16, 2011 2:42 am

I don't think WP allows you to embed iFrames, but I found this plugin that might allow you to:

http://wordpress.org/extend/plugins/embed-iframe/

Let me know if it works!
Image Image
Scirra Founder
B
124
S
37
G
25
Posts: 3,945
Reputation: 44,887

Post » Fri Dec 16, 2011 4:31 am

Thanks even more, I'll try that for sure!!
B
64
S
8
G
9
Posts: 290
Reputation: 8,590

Post » Fri Dec 16, 2011 6:59 am

I think it allows because it is working for me on my WP website without any plugins (I manually entered iframe tag to a post/page).

Who doesn't believe, here is a link:
http://www.askforgametask.com/html5-games/pick-up-sticks
ssusnic2011-12-16 07:17:01
B
9
S
2
G
5
Posts: 26
Reputation: 3,219

Post » Fri Dec 16, 2011 8:07 am

may I ask how you manually entered it into your post? I'm a complete noob when it comes to wordpress :/
B
64
S
8
G
9
Posts: 290
Reputation: 8,590

Post » Fri Dec 16, 2011 8:22 am

Well this is a question about how to use WordPress. I think you should find answers about using WP on its official website!

But anyway, after you login to your WP Dashboard and if you edit your post or page, you have there an editor with two tabs: Visual and HTML. Choose HTML tab and you can manually enter any html code.
B
9
S
2
G
5
Posts: 26
Reputation: 3,219

Post » Fri Dec 16, 2011 9:59 am

I was trying that, but when I'd press update, the iframe would be removed, after reading on WordPress the forums said that this is for security reasons, and that's why the plugin needs to be installed. So I will try with the plugin next
B
64
S
8
G
9
Posts: 290
Reputation: 8,590

Next

Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 34 guests