how to show the course start date in the page of course layout

Home Forums Legacy Support Support queries How-to & Troubleshooting how to show the course start date in the page of course layout

Tagged: 

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #354913
    cavic21
    Spectator
    how to show the course start date in the page of course layout https://prnt.sc/126sr7d https://prnt.sc/126ulnj
    #354936
    Diana
    Participant
    There is a container when you edit your course layout via Elementor COurse date Use that and place on your course layout and it's done
    #355105
    cavic21
    Spectator
    is the course date in the course information widget?
    #355131
    cavic21
    Spectator
    can you share some tutorial? I can only find the course date for the total course time, NOT for the course start date
    #355276
    Diana
    Participant
    I am sorry I forgot that it is possible without using any container http://prntscr.com/12afimh Edit the course and set the course start date It will be visible like this: http://prntscr.com/12afjkt
    #355279
    cavic21
    Spectator
    OK, Thanks. I will try it soon. it is better to show the course start date in a container rather than a course button.
    #355280
    Veronica
    Moderator
    hi please refer to this screenshot: http://prntscr.com/12afs30 and make changes accordingly as mentioned above in diana's reply
    #355284
    cavic21
    Spectator
    Hi Veronica, thank you, but I am not talking the total time of the course units. I just want to show both the course START date and the batches date(settings from the plugin batches. like Monday,Friday and so on) in the course layout page. what I want is as below: https://prnt.sc/12agp4m
    #355362
    Diana
    Participant
    The course is in different language so can you please share this course URL. I will check if we have any custom hook or not on which we can write custom code to show the start date as per your requirement
    #355417
    cavic21
    Spectator
    This reply has been marked as private.
    #355497
    Diana
    Participant
    This code will work for you. Paste in wp-admin > Plugins > editor > select wplms customizer plugin > wplms-customizer.php
    
    add_action('wplms_batches_extras','show_batch_extras',99999,1);
    function show_batch_extras($batch_id){
      $enable_batch_date = groups_get_groupmeta($batch_id,'enable_batch_date');
        if(!empty($enable_batch_date)){
          $start_batch_date = groups_get_groupmeta($batch_id,'start_batch_date');
          $end_batch_date = groups_get_groupmeta($batch_id,'end_batch_date');
          if(!empty($start_batch_date)){
            $start_time = strtotime($start_batch_date);
            echo '<div class="batch_start_date"><label>'.__('STARTS','wplms-batches').'</label><span>'.date_i18n( get_option( 'date_format' ), $start_time ).'</span></div>';
          }
          if(!empty($end_batch_date)){
            $end_time = strtotime($end_batch_date) + 86399;
            
            if($end_time < current_time('timestamp')){
              $enroll_flag = 0;
            }
            echo '<div class="batch_end_date"><label>'.__('ENDS','wplms-batches').'</label><span>'.date_i18n( get_option( 'date_format' ), $end_time ).'</span></div>';
          }
        }
    }
    
    #355515
    cavic21
    Spectator
    Amazing! It works! What's more, I want to show the weekly of days / month of days / spesic days as well. How to program it? could you please send me the code? Thanks in advance! https://prnt.sc/12cmypf
    #355648
    cavic21
    Spectator
    Sorry, the code can only effect on the elementor edit page, NOT for the frontend course page. Do you know how th set it? https://prnt.sc/12ev7im
    #355715
    Diana
    Participant
    If the batches date is set then it will show on Course Layout as well. The above code is not for elementor but for the course layout page
    #355773
    cavic21
    Spectator
    In fact, I have set the batches start/end date at the batches of group. see below https://prnt.sc/12fhioc And the the batches start/end date were showed on the elementor edit page. BTW, I try to show the weekly off schedule, but faild. could you please help me code it? https://prnt.sc/12fhno4 what's more, the batches start/end date CAN NOT be showed on front end page of course layout when login out and login as students https://prnt.sc/12fhuwj https://prnt.sc/12fi0q3 https://h5.vcode.fun/course/software-training-reloaded/ The settings of batches is below: https://prnt.sc/12fi5ci so I want you to help to show BOTH the weekly date AND the start date at the front end page of course layout.
Viewing 15 posts - 1 through 15 (of 18 total)
  • The topic ‘how to show the course start date in the page of course layout’ is closed to new replies.