Skip to:
Content
Pages
Categories
Search
Top
Bottom

adding unique id or class to buddypress extended profile fields

  • Avatar of nileshkul
    nileshkul
    Participant

    @nileshkul

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

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

    @nileshkul

    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()); ?>

    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)

You must be logged in to reply to this topic.