Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding HTML (div) before/after xprofile field


  • brownbeard
    Participant

    @brownbeard

    Hello!

    As the title states, I can’t figure out how to add HTML code before/after a particular xprofile field. I would like to wrap the input field in a div ideally.

    I can, however, modify the name and add html before and after it, but I want to do the same for the input box etc.

    	add_filter( 'bp_get_the_profile_field_name', function ($field_name){
    		if($field_name === 'Name') {
    			return '<div class="display-name">Display Name</div>';
    		}
    
    		return $field_name;
    	});

    Any ideas?

  • You must be logged in to reply to this topic.
Skip to toolbar