Add custom information to custom fields

Home Forums Legacy Support Support queries How-to & Troubleshooting Add custom information to custom fields

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3935
    iramis
    Spectator
    Hello, this issue is not very important, but I try it and I obtain error 500: Add custom information to custom fields in course detail section with different icons on each field https://wplms.io/support/knowledge-base/add-custom-information-to-custom-fields-in-course-detail-section-with-different-icons-on-each-field/ Thank you for your attention
    #3974
    iramis
    Spectator
    Ok, this works in function.php:   //metabox add_filter('wplms_course_metabox','wplms_custom_course_details_repeatable'); function wplms_custom_course_details_repeatable($metabox){ $metabox['vibe_course_details'] = array( 'label' => __('Custom Course details','vibe-customtypes'), // <label> 'desc'  => __('custom course details.','vibe-customtypes'), // description 'id'    => 'vibe_course_details', // field id and name 'type'  => 'repeatable', // type of field 'std'   => '' ); return $metabox; } //widget   add_filter('wplms_course_details_widget','wplms_custom_course_details_information');   function wplms_custom_course_details_information($details){ $custom_info = vibe_sanitize(get_post_meta(get_the_ID(),'vibe_course_details',false)); if(isset($custom_info) && is_array($custom_info)){ foreach($custom_info as $k=>$val){ $details[]='
    • <i class="icon-plus-1"></i> '.$val.'
      '; } } return $details; }
    #4034
    sandy
    Member
    Can you please confirm if the issue is resolved or not.   Thanks
    #4097
    iramis
    Spectator
    Heeo, I resolved so, but this solution works only in "function.php". If I use "<span style="color: #4b4d4d; font-family: Lato; font-size: 15px; line-height: 25px;">WPLMS customizer – wplms_customizer.php" and</span> <div id="crayon-56287b6126648424321279-1" class="crayon-line" style="box-sizing: border-box; font-family: Monaco, MonacoRegular, 'Courier New', monospace; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: 12px; line-height: 15px; color: #000000; white-space: pre; background: 0px 50% #f5f8fa;"><span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: teal !important;">add_filter</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #dd1144 !important;">'wplms_course_metabox'</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">,</span><span class="crayon-t" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: bold !important; color: #800080 !important;">array</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">$this</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">,</span><span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #dd1144 !important;">'wplms_custom_course_details_repeatable'</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">,</span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #009999 !important;">10</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">,</span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #009999 !important;">6</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">;</span></div> <span style="color: #000000; font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; line-height: 15px; white-space: pre; background-color: #f5f8fa;">            </span><span class="crayon-e" style="font-family: inherit; font-size: inherit !important; line-height: inherit !important; white-space: pre; box-sizing: border-box; height: inherit; font-weight: inherit !important; color: teal !important;">add_filter</span><span class="crayon-sy" style="font-family: inherit; white-space: pre; box-sizing: border-box; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">(</span><span class="crayon-s" style="font-family: inherit; font-size: inherit !important; line-height: inherit !important; white-space: pre; box-sizing: border-box; height: inherit; font-weight: inherit !important; color: #dd1144 !important;">'wplms_course_details_widget'</span><span class="crayon-sy" style="font-family: inherit; white-space: pre; box-sizing: border-box; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">,</span><span class="crayon-t" style="font-family: inherit; font-size: inherit !important; line-height: inherit !important; white-space: pre; box-sizing: border-box; height: inherit; font-weight: bold !important; color: #800080 !important;">array</span><span class="crayon-sy" style="font-family: inherit; white-space: pre; box-sizing: border-box; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">(</span><span class="crayon-v" style="font-family: inherit; font-size: inherit !important; line-height: inherit !important; white-space: pre; box-sizing: border-box; height: inherit; font-weight: inherit !important; color: #002d7a !important;">$this</span><span class="crayon-sy" style="font-family: inherit; white-space: pre; box-sizing: border-box; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">,</span><span class="crayon-s" style="font-family: inherit; font-size: inherit !important; line-height: inherit !important; white-space: pre; box-sizing: border-box; height: inherit; font-weight: inherit !important; color: #dd1144 !important;">'wplms_custom_course_details_in</span> <span style="color: #4b4d4d; font-family: Lato; font-size: 15px; line-height: 25px;">I always obtain 500 error.</span>          
    #4098
    iramis
    Spectator
    Sorry, I don't know what it's happens. Can you delete the replay? I should have liked to reply, but something went wrong. Thanks
    #4424
    Anshuman Sahu
    Keymaster
    You can paste that code in your child theme's functions.php as well  .
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Add custom information to custom fields’ is closed to new replies.