Firstname and Surname on certificate

Home Forums Legacy Support Support queries How-to & Troubleshooting Firstname and Surname on certificate

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #139540
    dantwah
    Spectator
    Hi! I want to show the first and last name of a user on its certificate (instead of the displayname that the default shortcode does). I saw several post on wplms but they are no longer up to date or to do not provide the correct answer. You refer to this tip: https://wplms.io/support/knowledge-base/shortcode-to-capture-a-custom-profile-field-in-student-profile/ but the video there is gone. How can I create a shortcode to do it? Love to hear from you. Kind regards
    #139637
    H.K. Latiyan
    Participant
    Hi, The shortcode for this is "certificate_student_field" You have to provide the field id to make it work, for example the firstname field id is 3 then the shortcode will be: [certificate_student_field field=3]
    #139643
    dantwah
    Spectator
    Hi, thanks for the response. So I have tried this but with no luck. I looked up the ID of the fields in the backend, First name = first_name and Last name = last_name. Note that these are buddypress fields though. Tried the following shortcode (with and without quotes): [certificate_student_field field=first_name][certificate_student_field field=last_name] Does not work. I also tried a custom php function: add_shortcode( 'get_user_fullname', 'get_user_fullname' );   function get_user_fullname(){   global $current_user;   get_currentuserinfo();   return $current_user->first_name . ' ' . $current_user->last_name;   } However this code always returns my own name, not the one that it should be.. hope you can help
    #139654
    H.K. Latiyan
    Participant
    Hi, This is not the id, the id is numeric, refer: http://prntscr.com/hmfb6q
    #139657
    dantwah
    Spectator
    Hi, Thanks, though I do not need these fields, I need the buddypress fields. the name field in the student account often fetches the username instead of real name. refer: https://prntscr.com/hmfeud
    #139747
    H.K. Latiyan
    Participant
    Hi, The fields that I showed in my screenshot are the buddypress fields only. You are sharing the wordpress user field screenshot. For this, there is no shortcode available in wplms. Since this is a wordpress field so you might find some third party plugin for a shortcode to fetch these fields.  
    #154159
    RMA
    Spectator
    Here is a plugin that did the trick for me. <span style="caret-color: #000000; color: #000000; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif; font-size: 14px; font-weight: 600; white-space: nowrap; background-color: #f7fcfe;">Shortcodes Ultimate</span>  
    #154160
    RMA
    Spectator
    Shortcodes Ultimate
    #154209
    Diana
    Participant
    @RMA, Thanks for updating us and our users too.
    #157017
    milla202012
    Participant
    Dear RMA, could you please give a bit more info on how did you insert a surname in certificate? Did you use a free or payed version of Shortcodes Ultimate? Did you use a shortcode creator? What code did you insert finally? Thank you.
    #157088
    Diana
    Participant
    @milla202012, @RMA Please help @milla202012 Paste this code in wp-admin > Plugins > Editor > Select WPLMS Customizer Plugin > and paste this code in wplms-customizer.php add_shortcode( 'get_user_fullname', 'get_user_fullname' ); function get_user_fullname(){ global $current_user; get_currentuserinfo(); return $current_user->first_name . ' ' . $current_user->last_name; } Shortcode will be :  [get_user_fullname]
    #157189
    milla202012
    Participant
    Well, here is a small problem. When I'm logged in like an admin and assign manually certificate to any student from Frontend Admin of Course I get the name of the current user - admin name, not the name of the user. Thank you!
    #157286
    Diana
    Participant
    @milla202012, This topic is someone else topic. Please post your issue here: https://wplms.io/support/forums/topic/how-to-insert-the-last-name-in-certificate/#post-157285
Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Firstname and Surname on certificate’ is closed to new replies.