Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easily position fields in user profile #1512

Open
jerasokcm opened this issue Apr 30, 2024 · 3 comments
Open

Easily position fields in user profile #1512

jerasokcm opened this issue Apr 30, 2024 · 3 comments

Comments

@jerasokcm
Copy link

I couldn't find a way to exactly position custom fields in the user profile page. By default, custom fields added with CMB2 appear at the end of the user profile. I tried to use the "priority" parameter, but It seems not having any effect. For instance, I would like to have my fields displayed after the "Contact" section. Maybe I'm overlooking something here?

@jtsternberg
Copy link
Member

There are only a few hooks in the user profile pages: https://github.com/WordPress/WordPress/blob/8aa7eb7e160ddf67638c6b1e890945633c0253fd/wp-admin/user-edit.php#L865-L885

If you want to create a PR to be able to hook into a different place (e.g. admin_color_scheme_picker, personal_options, profile_personal_options, wp_create_application_password_form), you're welcome to.

@jerasokcm
Copy link
Author

Thanks for your answer.
Do you imagine another way to conditionally display some user meta boxes on other locations of the profile edit page (e.g. personal options), without touching the CMB2 functionality?
Best regards.

@tw2113
Copy link
Contributor
tw2113 commented May 20, 2024

This really relies on available hooks in WP core to dictate what type of things can be shown/rendered where. I suspect user pages aren't hot topics for WP core devs to work on sadly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants