Default Display Name
Author | Posts |
---|---|
April 11, 2013 at 5:31 pm 2050 | |
Emil | Is there a way to make the display name default to the nickname set in a form? |
April 12, 2013 at 1:26 am 2060 | |
Tareq Hasan | Might be done, adding some code with |
April 12, 2013 at 11:13 am 2080 | |
Nathan | Would it be possible to elaborate? |
April 12, 2013 at 1:07 pm 2084 | |
Tareq Hasan | [php] return $user_data; add_filter( ‘wpuf_update_profile_vars’, ‘wpufe_set_nick_as_disp’ ); Should work. |
April 12, 2013 at 1:23 pm 2085 | |
Nathan | I’m afraid this did not 🙁 |
April 12, 2013 at 1:37 pm 2086 | |
Tareq Hasan | Working for me, are you using the latest version of the plugin? |
April 12, 2013 at 1:38 pm 2087 | |
Nathan | I believe so, could this be the global post issue I’ve run into a few times before? |
April 12, 2013 at 1:44 pm 2089 | |
Tareq Hasan | No, there isn’t any global $post issue in this case. |
April 12, 2013 at 2:05 pm 2091 | |
Nathan | Just checked again – definitely not working. Is it because the first and last name are also set? |
April 12, 2013 at 2:22 pm 2092 | |
Tareq Hasan | That doesn’t make sense, no it doesn’t depends on first and last name. Do you have this word |
April 12, 2013 at 2:32 pm 2094 | |
Nathan | Yep. Would this work on registration, or only on updating a profile? |
April 12, 2013 at 2:46 pm 2098 | |
Tareq Hasan | As you have it, it should work, I don’t find any reason why it’s not working. May be try with default theme? It’ll work only when updating the profile. |
April 12, 2013 at 2:55 pm 2100 | |
Nathan | Ah that would be why! Anyway to make that work on registration? |
April 12, 2013 at 3:04 pm 2103 | |
Tareq Hasan | It’s a different function for registration. add_action( ‘user_register’, ‘wpufe_set_nick_as_disp_reg’ ); |
April 12, 2013 at 4:42 pm 2107 | |
Nathan | Awesome! That did the trick! |
November 18, 2014 at 5:28 pm 30699 | |
Emil | Hi – just had the same problem and this really worked well – thanks! Hoverer, it doesn’t work when I try to update the nickname. Then it still shows the old nickname and not the new one. How do I fix that? |