Home › Forums › WPLMS AddOns › WPLMS Batches › Add date field to batches
Tagged: Datefield
- This topic has 8 replies, 4 voices, and was last updated 4 years, 11 months ago by Scott Lang.
Viewing 9 posts - 1 through 9 (of 9 total)
-
AuthorPosts
-
April 15, 2019 at 8:51 pm #204691ReferenceDMDParticipantHi, In order to feed a calendar, I need to add a date field to the course batches. Can you tell me how? I try to do with ACF but it does not seem to me that it is possible. Thank youApril 16, 2019 at 2:19 pm #204858Anshuman SahuKeymasterWell currently this is not available as of to add custom settings in batch settings . We will be adding provision for this in next update of wplms batches plugin .April 18, 2019 at 8:55 am #205161ReferenceDMDParticipantok. Can you tell me how to call wplms fields in php ? Any listing of id's ? ThanksApril 18, 2019 at 6:27 pm #205253DianaParticipant@referencedmd I guess you are asking for date field and how to call that in batches. I have a question where do you want to add this part please let me know so I can guide you betterMay 6, 2019 at 8:51 am #207732ReferenceDMDParticipantHello, I need to personalize template with different element as "Course name" and others contains in Wpmls elements.May 6, 2019 at 8:58 am #207733ReferenceDMDParticipantfor example : I need to call the Course Name in the Batch page header. And it doesn't work when I call //<?php bp_course_name(); ?>May 6, 2019 at 10:23 am #207748Scott LangModeratorupdate wplms batches to version 2.0 : adn then add this given code to your customizer plugin. add_filter('wplms_batches_settings_array',function($settings,$group_id){ if(!function_exists('groups_get_groupmeta')) return $settings; $saved_setting = groups_get_groupmeta($group_id,'custom_start_batch_date'); $settings['custom_start_batch_date']=array( 'id'=> 'custom_start_batch_date', 'label'=> __('Custom Date','wplms-batches'), 'type'=> 'date', 'check'=>$saved_setting ); return $settings; },10,2); add_action('wplms_batches_after_batches_settings_save',function ($group_id,$post){ if(!function_exists('groups_update_groupmeta')) return $settings; if(isset($post['custom_start_batch_date'])){ groups_update_groupmeta($group_id,'custom_start_batch_date',$post['custom_start_batch_date']); } },10,2);May 6, 2019 at 3:43 pm #207827ReferenceDMDParticipantThanks Scott, This is for the first demand. I added this code in my functiun and see the field in my batch option. But it does not save the value and there is no change in the Batche page. By the way, do you have any clue for the second demand ? RegardsMay 7, 2019 at 6:17 am #207914Scott LangModeratorHi, This is just a custom setting which is added to your setting page for batche Now, you can write code with the help of added setting to add new feature for batch or make some restriction. Note: Do not write code in wplms-batch-plugin otherwise after update of wplms-batch-plugin code will be updated.
-
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)
- The topic ‘Add date field to batches’ is closed to new replies.