The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Canvas/JS in Pages/Posts (4 posts)

  1. Taschmahal
    Posted 3 years ago #


    I'm a bit confused. It seems like wordpress can't handle canvas/ JS ins posts and pages. I already tried the following with different themes:

    Link1 Link2 Link3.

    It's a pity that the pages and post areas aren't "blank pages" where you could insert all kind of code.

    Has anyone had this problem before and could help me out? I would be pleased!

  2. Pioneer Web Design
    Posted 3 years ago #

    You can do this with a Page Template

  3. Taschmahal
    Posted 3 years ago #


    I tried your solution, but there are two problems:

    First, the JS should load in the <header>.

    The second problem: canvas uses <body onload....>. The onload must be in the body-tag. So honestly no solution.

    But thanks nevertheless.

    Any other solutions?

  4. Taschmahal
    Posted 3 years ago #


    Got the solution!

    Load the JS in your post like:

    <script type="text/javascript" src="http://domain.com/js.js"></script>

    And load the funciotn inside the JS:

    window.onload = function doCanvasblabla()

    Then Canvas does the rest!

    <canvas width="700" height="500" id="canvas">Your browser does not support html5 canvas.</canvas>

Topic Closed

This topic has been closed to new replies.

About this Topic