Skip to:
Content
Pages
Categories
Search
Top
Bottom

adding unique id or class to buddypress extended profile fields

  • @nileshkul

    Participant

    i am trying to add unique class or id to each extended profile field

Viewing 2 replies - 1 through 2 (of 2 total)
  • @nileshkul

    Participant

    I figured out the way to do this..just add in the markup of template file<?php echo sanitize_title( bp_get_the_profile_field_name()); ?>

    @djpaul

    Keymaster

    Good idea, though you’d want the code to look like this:

    id="<?php echo esc_attr( bp_get_the_profile_field_name() ); ?>" ...

    This ensures the output is correctly escaped to avoid XSS attacks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘adding unique id or class to buddypress extended profile fields’ is closed to new replies.
Skip to toolbar