Page only shows half the content

  • Unknown's avatar

    Hello!

    I am trying to embed more content below an first embedded video, it’s the first thing that appears on the page. But for some reason when I try to add something below it using a custom fields editor which lives in the user portal for each user, it won’t show up. The php content for the page I am trying to added content for is below, can someone please help. Thanks!

    .embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; }
    .embed-container iframe,
    .embed-container object,
    .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

    <?php
    $post_thumbnail = get_the_post_thumbnail( $lesson_id );
    echo '

    ‘;
    $title = get_the_title($lesson_id);
    if (‘Warm-Ups’ == $lesson_name) {
    $title = ‘Warm Ups’;
    }
    if (‘Cool-Down’ == $lesson_name) {
    $title = ‘Cool Down’;
    }
    echo ‘

    ‘ . $title . ‘

    ‘;
    echo ‘

    ‘;
    /*
    if warm up is requested to add again, uncomment this one
    if($lesson_id == 570){
    $post_12 = get_post(2285);
    echo ‘

    Warm up

    ‘;
    $trim_me = $post_12->post_content;
    echo $trim_me;
    } */
    // echo get_field(‘follow_along_video’,$lesson_id);
    if (‘Warm-Ups’ == $lesson_name) {
    ?>
    [vimeo 311167472 w=640 h=360]

    [vimeo 311167475 w=640 h=360]
    <?php
    }
    echo '

    ‘;
    echo ‘

    ‘;
    ?>

    Navigation

    <!– Closing

    –>

    <?php
    echo '

    ‘;
    $all_lesson = $wpdb->get_results(‘SELECT result_data,quiz_id,result_percentage FROM `wp_custom_learndash` WHERE `lesson_id` = $lesson_id AND user_id = $userID ORDER BY `id` ASC’);
    $array_type_vid = [];
    $result_percentage = [];
    $iter=0;
    foreach ($all_lesson as $key=>$value_lesson) {
    $result_percentage[$value_lesson->quiz_id] = $value_lesson->result_percentage;
    $data_vid = json_decode($value_lesson->result_data);
    $quiz_id = $value_lesson->quiz_id;
    $dom = new DOMDocument;
    if (strpos($data_vid->data, ‘class’) !== false) {
    $dom->loadHTML($data_vid->data);
    foreach($dom->getElementsByTagName(‘div’) as $node){
    $array_type_vid[$quiz_id][$iter][$node->getAttribute(‘class’)] = $dom->saveHTML($node);
    $iter++;
    }
    }else{
    $data_vid = json_decode($value_lesson->result_data);
    if($data_vid->data !== 0){
    echo $data_vid->data.’
    ‘;
    }
    }
    }

    #generating the videos here
    foreach ($array_type_vid as $qkey => $value) {
    foreach ($value as $nkey => $item) {
    #default follow along results
    if (array_key_exists(‘follow_along’,$item)){
    echo ‘

    ‘.$item[‘follow_along’].’

    ‘;
    }
    }
    #default test value
    $qkey_data = get_field( ‘follow_along_video_test_default’,$qkey);
    echo $qkey_data;
    #for pike active passive test solution
    if($qkey == 1339){
    if($result_percentage[$qkey] >= 80){
    echo get_field( ‘pike_more_80_follow_along’,$qkey);
    }elseif($result_percentage[$qkey] = 100){
    echo get_field( ‘straddle_over_100_follow_along’,$qkey);
    }elseif($result_percentage[$qkey] < 100){
    echo get_field( 'straddle_less_100_follow_along',$qkey);
    }
    }
    }
    /*
    if cool down is requested to add again, uncomment this one
    if($lesson_id == 1325){
    $post_12 = get_post(2287);
    echo '

    Cool Down

    ‘;
    $trim_me = $post_12->post_content;
    echo $trim_me;
    } */
    ?>

    h2:not(.title){
    font-size: 20px !important;
    font-weight: 600 !important;
    padding-left: 45px !important;
    }

  • Hi there,

    Looks like you’re in the wrong forum. It appears that you’re using the open source WordPress.org software and you need to seek help at these forums:

    https://wordpress.org/support/forums/

    These forums are for WordPress.com hosted sites only. If you want to know more about the differences between WordPress.com and WordPress.org you can read this document:

    WordPress.com vs. WordPress.org

  • The topic ‘Page only shows half the content’ is closed to new replies.