Add date of birth to certificate of completion

Home Forums Legacy Support Support queries Other issues Add date of birth to certificate of completion

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #376687
    dramalanguage
    Spectator
    Hello wplms team I want the date of birth to be added to the certificate of completion. But when I look at the related documents, there is no function to add the date of birth. https://wplms.io/support/knowledge-base/custom-certifcate-codes-and-verification/
    #376689
    Veronica
    Moderator
    hi let's take an example with the field name "Real Name" What you can do is create a profile field named ” Real Name ” for this from wp-admin -> users -> profile fields. and ask users to fill up their real name. and then use this shortcode to show the field value of the user in the certificate : [certificate_student_field field="Real Name"] , note that the field parameter is case sensitive in the above shortcode.
    #376756
    dramalanguage
    Spectator
    The answer you gave is not correct. I saw an article that Diana solved by adding the date of birth item to the certificate of completion. https://wplms.io/support/forums/topic/create-new-certificate-shortcode/
    #376758
    dramalanguage
    Spectator
    This reply has been marked as private.
    #376815
    Veronica
    Moderator
    Instead of [tax_code] use [certificate_code] which is already available, your requirement for showing an unique number will be fulfilled
    
    Then Go to wp-admin > Plugins > Editor > Select WPLMS Customizer Plugin and add this code there
    
     
    
    add_shortcode(‘certificate_student_birth_place’,’certificate_student_birth_place’);
    
     function certificate_student_birth_place( $atts, $content = null ) {
    
            $user_id = $_GET[‘u’];
    
            if(isset($user_id) && $user_id)
    
                return bp_get_profile_field_data(‘field=Location&user_id=’.$user_id);
    
            else
    
                return ‘[certificate_student_birth_place]’;
    
        }
    
    This will be your shortcode for birthplace. This code fetches the value from Location Field and will show the text on your certificate when student earn this certificate [certificate_student_birth_place]
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add date of birth to certificate of completion’ is closed to new replies.