Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › how to show the course start date in the page of course layout
Tagged: Course Layout
- This topic has 17 replies, 4 voices, and was last updated 3 years, 7 months ago by Anshuman Sahu.
-
AuthorPosts
-
April 28, 2021 at 8:43 am #354913cavic21Spectatorhow to show the course start date in the page of course layout https://prnt.sc/126sr7d https://prnt.sc/126ulnjApril 28, 2021 at 11:51 am #354936DianaParticipantThere is a container when you edit your course layout via Elementor COurse date Use that and place on your course layout and it's doneApril 29, 2021 at 6:14 am #355105cavic21Spectatoris the course date in the course information widget?April 29, 2021 at 8:29 am #355131cavic21Spectatorcan you share some tutorial? I can only find the course date for the total course time, NOT for the course start dateApril 30, 2021 at 5:53 am #355276DianaParticipantI 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/12afjktApril 30, 2021 at 5:59 am #355279cavic21SpectatorOK, Thanks. I will try it soon. it is better to show the course start date in a container rather than a course button.April 30, 2021 at 5:59 am #355280VeronicaModeratorhi please refer to this screenshot: http://prntscr.com/12afs30 and make changes accordingly as mentioned above in diana's replyApril 30, 2021 at 6:05 am #355284cavic21SpectatorHi 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/12agp4mApril 30, 2021 at 11:49 am #355362DianaParticipantThe 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 requirementApril 30, 2021 at 3:38 pm #355417cavic21SpectatorThis reply has been marked as private.May 1, 2021 at 6:26 am #355497DianaParticipantThis 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>'; } } }
May 1, 2021 at 8:23 am #355515cavic21SpectatorAmazing! 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/12cmypfMay 3, 2021 at 4:20 am #355648cavic21SpectatorSorry, 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/12ev7imMay 3, 2021 at 12:14 pm #355715DianaParticipantIf 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 pageMay 3, 2021 at 4:05 pm #355773cavic21SpectatorIn 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. -
AuthorPosts
- The topic ‘how to show the course start date in the page of course layout’ is closed to new replies.