Support » Plugin: WP YouTube Lyte » Shortcodes columns incompatibility

  • Resolved Jaro

    (@pixtweaks)


    Hello,
    On my website, I can make columns with free plugin “shortcodes” and WP Bakery. When I put httpv between [shortcodes] for columns, it’s misplaced.

    For plugin shortcodes it’s like this:

    Back-end:
    [su_row class=””] [su_column size=”1/2″ center=”no” class=””] httpv://www.youtube.com/watch?v=zsDwFGz0Okg[/su_column] [su_column size=”1/2″ center=”no” class=””]httpv://www.youtube.com/watch?v=zsDwFGz0Okg[/su_column] [/su_row]

    HTML:
    <div class=”su-column su-column-size-1-2″><div class=”su-column-inner su-clearfix”></div></div>
    <div class=”lyte-wrapper fourthree” style=”width:480px;max-width: 100%;margin:5px auto;”>
    <div class=”lyte lP” id=”WYL_2aG-UeaiRKQ” itemprop=”video” itemscope=”” itemtype=”https://schema.org/VideoObject”&gt; … and so on.

    In WP Bakery is very similar. Can you fix it, or how to place it within shortcodes columns? Thank you!

    Best Regards,
    Jaro

Viewing 15 replies - 16 through 30 (of 33 total)
  • Jaro

    (@pixtweaks)

    @optimizingmatters thank you for the clarification, we need to work around it.

    Hello @optimizingmatters, I’m sorry to bother you but I’m desperate. I got another bug and tried so many things and it just doesn’t work. The issue is that your plugin loads its scripts and displays video thumbnails only on desktop. When I switch to mobile, YOUTUBE original iframes is loaded. Like there was some fallback mechanism that my site triggered. Now, on blank WP site your plugin works fine, but on mine doesn’t, I tried to turn off all plugins, theme, reinstall core…No effect. Can you please have a look or suggest any idea what could be the cause? URL of the website is https://www.heritageafrica.com/

    Thank you so much!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that LYTE’s default behavior, which you can change with this code snippet;

    
    add_filter('lyte_do_mobile','__return_true');

    reason is that on mobile “autoplay” does not work on YT video’s, meaning that when you press play on LYTE the YT video is loaded but does not play, so you have to press play a 2nd time.

    @optimizingmatters still doesn’t work. I tried before the script that is in FAQ part, no results, it’s always loading iframe. What else I can do? Thank you very much!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, then something must be wrong with the code snippet. how/ where did you add it?

    @optimizingmatters I tried both, code snippets plugin and added it to functions.php
    BTW can I debug it if it’s active somehow?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, if you see
    var mOs=navigator.userAgent.match(/(iphone|ipad|ipod|android)/i);

    in your page source, then the filter is not active. It should read
    var mOs=null;

    so do you have a page cache (a caching plugin or at hoster level or cloudflare page rules or …)?

    Hello @optimizingmatters ,
    I have a working version on my local WP so no caching or Cloudflare, but otherwise yes, we’re using both. Is is an issue that your plugin won’t work with caching/CF?
    I have found the code and disabled if and make just m0s=null, still doesn’t work.
    Here is the code: https://screencast-o-matic.com/screenshots/u/VfEm/1564394924525-40159.png

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Is is an issue that your plugin won’t work with caching/CF?

    no, just that a page cache could have *hidden* the change after the code snippet being added. but that seems not to be the case as not working locally either.

    but no idea what is going on to be honest, sorry, esp. if mOs = null then as per the JS code it will (should) show the LYTE version.

    @optimizingmatters I can’t make it work. Is there anything else I can try? Or if you interested to solve it I can create a staging site and you can have a look. Thank you!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    When having made that change to force var mOs=null;, do you also see that appear in your page’s HTML source?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, based on that it should simply work Jaro. is this on a live site I could have a look at?

    Hello @optimizingmatters,
    I implemented on the live site and it works on the front page but not on subpages like https://www.heritageafrica.com/destinations/ and the var “mOs=null” is in the code.
    Thank you!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Not sure how, but it looks like something (wp-bakery?) is overriding LYTE in mobile, because the HTML that I see when inspecting the page is not LYTE’s;

    Mark the id="ytplayer" instaead of LYTE’s id="iF_xyz123" (where xyz123 is the youtube ID) attribute in the iframe tag.

    If the problem does not occur on the homepage then compare how you added the vid there vs. the destinations page and go from there?

Viewing 15 replies - 16 through 30 (of 33 total)
  • You must be logged in to reply to this topic.