Replies: 1 comment
-
|
Try: add_filter( 'wp_user_profiles_show_other_section', '__return_false', 11 ); // 11 or higher priorityBy default, Alternatively, you could unhook the Other box entirely with something like remove_action( 'init', 'wp_user_profiles_register_other_section' ); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the past I have used the
wp_user_profiles_core_filesfilter to basically rewrite the entire default sections like so:That was fine when I had to do some serious customisation. But now I only want to accomplish two things:
In crawling through the source code I run across the
wp_user_profiles_show_other_sectionfilter in sections.php, but it's not doing what you'd think it should, namely: show_other_section as in:add_filter( 'wp_user_profiles_show_other_section', '__return_false');So, what would be the recommended procedure for simply removing a single section like the catch-all 'other' tab?
Once this is settled (or improved if needed) I will happily expand the README.md with some more detailed documentation and even an example or two under:
p.s. will also fix the typo in the above.
Beta Was this translation helpful? Give feedback.
All reactions