• leogc

    (@leogc)


    Hi there,

    love this Calendar but always when i try to embed Video Codes it shows just “kryptic” signs in the frontend.

    I am Refering to Embeded Codes from Humix. like this one:

    <script data-ezscrex="false" data-cfasync="false">(window.humixPlayers = window.humixPlayers || []).push({target: document.currentScript, videoID: 'IJ1VKxskrlu'});</script><script async data-ezscrex="false" data-cfasync="false" src="https://www.humix.com/video.js"></script>

    In other places of my site this is working very well, just not in the Calendar.

    • This topic was modified 1 year ago by leogc.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    What I’d suggest is writing a small custom shortcode to render the script tag, instead of including it directly in the content. E.g.

    add_shortcode( 'humix_embed', 'embed_humix_video' );
    function embed_humix_video( $atts, $content ) {
    $args = shortcode_atts(
    array(
    'id'=> '',
    ),
    $atts,
    'humix_embed'
    );

    $video_id = ( $args['id'] ) ? sanitize_text_field( $args['id'] ) : false;

    return ( $video_id ) ? '<script data-ezscrex="false" data-cfasync="false">(window.humixPlayers = window.humixPlayers || []).push({target: document.currentScript, videoID: ' . "'$video_id'" . '});</script><script async data-ezscrex="false" data-cfasync="false" src="https://www.humix.com/video.js"></script>' : '';
    }

    (untested.)

    Thread Starter leogc

    (@leogc)

    Hi there i am not a programmer guy, so were should i put this “Shortcode” and who did this shotcode know which Video i want to embed?

    Greetings

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Embed Video Codes not working’ is closed to new replies.