WordPress.org

Support

Support » Plugins and Hacks » Autoplay Videos only if is in a Single Post not in Front Page

Autoplay Videos only if is in a Single Post not in Front Page

Viewing 1 replies (of 1 total)
  • I was able to find the code in smartyoutube.php of the plugin:

    $ap = '';
    		if ( is_single() ) {
    			if ( $context == 'post' && $autoplay_first && ! $this->first ) {
    				$ap = '&autoplay=1';
    				$this->first = true;
    			} else if ( ( $context == 'post' && $autoplay && ! $autoplay_first ) || ( $context == 'excerpt' && $autoplay ) ) {
    				$ap = '&autoplay=1';
    			} else {
    				$ap = '';
    			}

    replace with:

    $ap = '';
    		if ( is_single() ) {
    
    				$ap = '&autoplay=1';

    Just disable Autoplay in the Plugin options but this replacement of code will Autoplay in Single Posts.

Viewing 1 replies (of 1 total)
  • The topic ‘Autoplay Videos only if is in a Single Post not in Front Page’ is closed to new replies.