尝试在 WordPress 页面中显示 html5/javascript 游戏时出现 WordPress 404 错误
我正在尝试在 WordPress 网站中显示 html5/javascript 代码(作为自定义 WP 模板)以显示 html5 国际象棋游戏。然而,我被引用问题带来的 404 错误所困扰。 这个可以在网上看到@ http://www.buryknightschess.org.uk/play-chess/
我是感谢您的帮助&建议修复这些错误以使页面引用正确&在我的 WordPress 页面中显示此游戏。
(顺便说一句,这个游戏来自 html5chess @ sourceforge & 我可以链接到我的 WordPress 页面中的演示并且可以正确显示。但是我已经编辑了那里的代码 & 我想将其硬编码到我的 WordPress 页面中,如果可能的!)。谢谢
更新: 我现在正在取得进展,因为我已经成功地让我的棋盘显示并显示了。在 WebMatrix 本地主机服务器中工作。我使用带有 php 代码的自定义 WordPress 页面模板来指向 WP 主题根目录和主题。现在这些链接是正确的,它可以工作!我确实需要对 css 进行一些小的调整来将方块/div 居中,但我可以使用它 &其他较小的页面编辑。下一阶段是在在线网站上进行这些编辑,但我现在对成功更有信心。最初我认为这可能是 WordPress 阻止了 JavaScript 调用,但我认为这只是正确添加 JS 链接的问题!当我在线工作时我会再次发布。
I am trying to display html5/javascript code (as custom WP template) in a WordPress site to show html5 chess game. However I am plagued by referencing problems giving 404 errors.
This can be seen online @
http://www.buryknightschess.org.uk/play-chess/
I am grateful for help & advice to fix these errors to get the pagereferencing correct & display this game in my WordPress page.
(BTW this game comes from html5chess @ sourceforge & I can link to the demo there in my WordPress page & that displays properly. However I have edited the code from there & I would like to hard code this into my WordPress page if possible!). Thanks
UPDATE:
I am making progress now in that I have managed to get my chessboard displaying & working in WebMatrix localhost server. I use a custom WordPress page template with php code to point to WP theme root directories & now these links are correct it works! I do need minor css adjustments to centre the pieces on squares/divs but I can play around with that & other minor page edits. Next stage is to make these edits on the online website but I am more confident of success now. Initially I thought it maybe WordPress blocking JavaScript calls but I think it is simply a matter of adding the JS links correctly! I will post again when I have it working online.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需查看我的 StackExchange 帖子并检查我的疑问是否已得到解答。这篇文章很旧并且很古老。仍然是一个未答复的帖子,除非我在上面的帖子的编辑中回答了它,所以我现在在这里的帖子只是为了确认我回答了我自己的问题!
Just reviewing my StackExchange posts and checking whether my queries have been answered. This post is very old & remained as an unanswered post except I have answered it in my edit to my post above and so my post here now is simply to confirm I answered my own question!