I'm trying to edit the user profile page, not the login page.

However, with Drupal 7, the template for the profile and the login page is the same.

I tried to modify page--user.tpl.php, but it also modifies the login page. And modify user--profile.tpl allow to modify the order of the fields but not the entire page.

Do you know how to do it ?

  • Maybe add another template suggestion for logged in users? And then have page--user--logged-in.tpl.php?
    – leymannx
    May 18, 2020 at 16:23
  • Yes I thought of this solution, but the template must be the same whether the user is logged in or not
    – Hgfdsoiu
    May 18, 2020 at 17:23
  • Sorry, I don't understand what that means. Can you maybe edit your question and add a little bit more info about what exactly it is you want to achieve in the end? And why?
    – leymannx
    May 18, 2020 at 17:42

1 Answer 1


For theming user profile page use page--user--%.tpl.php template file.

To see all possible template suggestions right in your code you can enable Theme debug mode in sites/default/settings.php:

$conf['theme_debug'] = TRUE;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.