Custom input in edit profile page I create a template called page--user--edit.tpl.php

Into that file, I want to display some inputs for editing like username and password only, not the default edit form.

I don't know the code to put into this file for displaying only these input.

Thanks for your help !
Use Hook form alter and find the id of user edit form. Unset all extra fields but username and password. In templates it is not recommended to add php. If you want to disable or hide something its better to disable it from the render array. here is an example:

&lt;themnam&gt;_form_&lt;FORM_ID&gt;_alter($form, &amp;$form_state) {
 dpm($form);
 unset($form['your-field']);
}


I hope it helps