Show full last name of volunteer

Viewing 7 reply threads
  • Author
    Posts
    • #3018
      Chris L
      Participant

      I’d like the option to show the full last name of the volunteer under “Available Spots”.

    • #3366
      Stephen Sherrard
      Keymaster

      Sorry there was a typo… add_filters should be add_filter (not plural).

      The below code has been tested and works:

      
      add_filter( 'pta_sus_display_signup_name', 'pta_modify_signup_display_name', 10, 2 );
      
      function pta_modify_signup_display_name( $display_name, $signup ) {
      	return esc_html($signup->firstname).' '.esc_html($signup->lastname);
      }
      
    • #3367
      Kym
      Participant

      Thank you!!!!

    • #11143
      Jim Shollin
      Participant

      I could use a little more help where the code resides – add_filter( ‘pta_sus_display_signup_name’, ‘pta_modify_signup_display_name’, 10, 2 );

    • #11145
      Kym
      Participant

      Jim – the entire code snippet that Stephen provided above would go in your theme’s functions.php file. This assumes you have FTP access to your site’s files. It would be located in the wp-content/themes/[your theme]/ folder.

      Kym

    • #11147
      Stephen Sherrard
      Keymaster

      Thanks for contributing Kym.

      Jim, Kym is right, but you can also use the simple built-in editor in WordPress to copy and paste that code snippet I listed above into your theme’s functions.php file. Look under Appearance>Editor . Then, look for the functions.php file in the list on the right side of your screen (making sure your active theme is also selected first in the select box to select the theme to edit). Really best to have a child theme for that so that you can still update the parent theme without wiping out that added bit of code. In that case, be sure to select the child theme first, and edit its functions.php file.

    • #11153
      Jim Shollin
      Participant

      Thank you. That’s the direction I needed.

    • #14791
      Stephen Sherrard
      Keymaster

      This is now being added as a new option in version 2.0.1 – so, no code snippets required any more.

Viewing 7 reply threads
  • The topic ‘Show full last name of volunteer’ is closed to new replies.