Using wp_footer
hook to add a <canva>
element to the page is printing <canvas class="my_canvas">
instead of <canvas class="my_canvas"></canvas>
Here is the hook:
if (!function_exists('add_canvas')) {
function add_canvas()
{
echo '<canvas class="my_canvas"></canvas>';
}
}
add_action('wp_footer', 'add_canvas', 100);