inject code Iframe

Home Forums Legacy Support Support queries How-to & Troubleshooting inject code Iframe

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #386940
    sebas
    Participant
    how to inject code in the course template, in the place where the students see the page (members page), for example, I want to inject a custom Html which is basically an IFrame, which appears in all the course pages next to each video , is an interactive tool that is needed in each lesson this is example: https://prnt.sc/ztwb_w-NvpfY
    #386960
    sebas
    Participant
    we need the Iframe to appear in all the lessons, please help me with this as soon as possible
    #386969
    Veronica
    Moderator
    hi for that you can use custom course nav plugin and add the custom section in course setting then you can add this in course info block in elementor so the same will be visible here.
    #386979
    sebas
    Participant
    the plugin is paid ? How can I do that or in which part of Elementor is this done, please give me a step by step
    #386982
    sebas
    Participant
    We already have the code as indicated in the plugin but we do not know how to make it appear in all the lessons https://prnt.sc/xGIByhLisg9- we need is to inject an html that loads in all the lessons of a course https://prnt.sc/ncNCqIz559K7 the iframe would go in the red box, we leave in 2 hours, help us with this please
    #386983
    MrVibe
    Keymaster
    Ok, you use this code to solve this.
    #386984
    MrVibe
    Keymaster
    The ideal way would be to add the iframe in the unit itself however, since you want to apply to all units following code will help.
    
    add_filter('bp_course_api_get_user_course_status_item_unit_meta',function($meta){
    
            if(empty($meta['iframes'])){$meta['iframes']=[];}
            $meta['iframes'][] = 'https://ig1kqagxzl.preview.infomaniak.website/wp-content/uploads/acordium/index.html?tipo?diatonico&sibtip=DGC&fixed=1';
    
        return $meta;
    });
    the above code will add your iframe video in all the units of your course.
    #386987
    sebas
    Participant
    Which file should I edit to inject that code?
    #386998
    Veronica
    Moderator
    you need to add the code in wp-admin>>plugins>>plugin editor>>select the wplms-customizer plugin and the code in wplms-customizer.php
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘inject code Iframe’ is closed to new replies.