• Resolved snsdragon

    (@snsdragon)


    I am trying to add function to autoplay videos in mycred_video hook
    i got this code from the forum

    add_filter( 'mycred_video_query_youtube', 'mycred_adjust_youtube_iframe' );
    function mycred_adjust_youtube_iframe( $attr ) {
    	$attr['autoplay'] = 1;
    	return $attr;
    }

    i am using wordpress multi-site so when i trying to add them on supe-site function.php
    i am getting an error ( some can’t communicate error )

    can you tell me where to add this script in wordpress multisite = i also tried using WPCode plugin for the same but didn’t worked

Viewing 4 replies - 1 through 4 (of 4 total)
  • A.Tariq

    (@arsalantariq)

    Hi @snsdragon,

    Thank you for contacting us, Please check on which site myCred has been installed. Add the code snippet on the site where myCred is active.

    Thread Starter snsdragon

    (@snsdragon)

    Mycred is active sitewide ( Multisite Enable : Every website ) i wanna add the above code in one particular blog. I have used the code Snippet plugin but this snippet doesn’t seem to work, or i might be adding the code wrongly. Please guide

    Thread Starter snsdragon

    (@snsdragon)

    I just added another code snippet via code snippt plugin and it worked perfectly , I think the above code might have some error . it’s not auto play youtube video on page load

    A.Tariq

    (@arsalantariq)

    @snsdragon,

    Please try using the below shared Code Snippet:

    add_filter( 'mycred_video_query_youtube', 'mycred_adjust_youtube_iframe' );
    function mycred_adjust_youtube_iframe( $attr ) {
    $attr['autoplay'] = 1;
    $attr['mute'] = 1;
    return $attr;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘adding code in multisite function.php’ is closed to new replies.