Show profile field on profile page I created user-login.tpl.php file in my custom theme.

Then I add this code :

&lt;div class="profile"&lt;?php print $attributes; ?&gt;&gt;
  &lt;h2&gt;&lt;?php print ($user_profile['field_nom']);  ?&gt;&lt;/h2&gt;
  &lt;pre&gt;
    &lt;?php print_r($user_profile); ?&gt;
  &lt;/pre&gt;
&lt;/div&gt;


It display my name correctly but, when I inspect in the browser its look like this ...

&lt;h2&gt;
    &lt;div class="field field-name-field-nom field-type-text field-label-above clearfix"&gt;

        &lt;div class="field-label"&gt;My name:&amp;nbsp;&lt;/div&gt;

        &lt;div class="field-items"&gt;
            &lt;div class="field-item even"&gt;Branquet&lt;/div&gt;
        &lt;/div&gt;

    &lt;/div&gt;
&lt;/h2&gt;


I just want to have the text, not a bunch of unless divs
One option is you can user php function in tpl file before print.

strip_tags($user_profile['field_nom']);


Refer http://php.net/manual/en/function.strip-tags.php