• Resolved sab4242

    (@sab4242)


    It’s an awesome plugin no doubt because it works with all other default themes but it’s not working with my custom theme. after doing some research I added hooks wp_head, wp_footer, wp_enqueue_script which enabled other plugins but still unable to enable this one. Could you please me in this regard what my theme is missing ?

    I am trying this one on a demo site https://goo.gl/Pz1QuK

    Kindly help me out

    https://www.ads-software.com/plugins/wpmbytplayer/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author pupunzi

    (@pupunzi)

    Hi,
    You have a javascript error in your page due to the use of the short cut jQuery $ not allowed by WordPress and that is probably blocking any other script in the page. The error is thrown loading the $('.carousel').carousel(...) function.

    Use jQuery('.carousel').carousel(...) instead.

    Bye,
    Matteo

    Thread Starter sab4242

    (@sab4242)

    HI Matteo,

    Just changed but still nothing happening ??

    Plugin Author pupunzi

    (@pupunzi)

    Now you don’t have errors and the script is correctly loaded but there’s no YTPlayer defined in the page… nothing to run as background video.

    You should add a Youtube video URL from the YTPlayer settings page or using the short code in the page/post editor it should run.

    Bye,
    Matteo

    Thread Starter sab4242

    (@sab4242)

    Hi Matteo,

    There is a youtube link as soon as I change the theme it starts working. right now I changed the theme and its working but doesn’t work with my theme ??

    Plugin Author pupunzi

    (@pupunzi)

    Try using the short-code instead of the YTPlayer settings to insert the background video.

    probably the page you are pointing me to is not the homepage neither the front-page for your theme instance.

    The YTPlayer settings page add the video only if the actual page is the home-page or the front-page. If you need a background video in any other page you should use the short-code generator available from the page/post editor.

    Bye,
    Matteo

    Thread Starter sab4242

    (@sab4242)

    this is index.php. making any sense now?

    Plugin Author pupunzi

    (@pupunzi)

    I don’t know what is generating the issue in your theme and why your hompage is not set as isHome() by WordPress; if the page was recognized as homepage or as frontpage by wordpress the plug-in should have injected something like the below code in your page:

    <!-- mbYTPlayer Home -->
    <script type="text/javascript">
    	jQuery(function(){
    	    var homevideo = "<div id=\"bgndVideo_home\" data-property=\"{videoURL:'https://www.youtube.com/watch?v=NzUQ3LjCJ5g', opacity:1, autoPlay:true, containment:'body', startAt:1, stopAt:false, mute:false, optimizeDisplay:true, showControls:false, printUrl:false, loop:false, addRaster:false, quality:'default', ratio:'16/9', realfullscreen:'true', stopMovieOnClick:'false', gaTrack:'true'}\"></div>";
    	    jQuery("body").prepend(homevideo);
    	    jQuery("#bgndVideo_home").YTPlayer();
        });
    
    </script>
    <!-- end mbYTPlayer Home -->

    If you take a look at the source of your homepage that doesn’t happens.

    You should chek the PHP side of your theme.

    Bye,
    Matteo

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘not working with custom theme’ is closed to new replies.