There is a phtml file from a module that I want to override in my theme. The path to the file is: \vendor\mageplaza\magento-2-social-login\view\frontend\templates\form\social.phtml.

I am trying to figure out what the path should be to my override social.phtml file but I am finding it confusing. What is the correct path I should put my file?


You can override social.phtml by below path


Example :

As per Magento-2 if you want to override vendor module templates then you need to follow an example

Vendor Module : mageplaza\magento-2-social-login

You need to make this directory in your theme like below

app/design/frontend/YourTheme/Vendor/ : Mageplaza_SocialLogin

and module view templates \view\frontend\templates\form\social.phtml is under in theme templates folder like : templates/form/social.phtml

Finally your template path is :

  • How would I have worked that out? The path and names are structured differently, what is the rule you followed to get the correct path?
    – Guerrilla
    Jun 22 '17 at 7:32
  • You need to follow magento-2 theme rules. Jun 22 '17 at 7:33
  • 1
    That is not a helpful answer. Your path does not seem to match, you captitalized some letters and removed hypen. I cannot find any documentaion saying to do that
    – Guerrilla
    Jun 22 '17 at 7:34
  • Check my updated answer with example. Jun 22 '17 at 7:43

We can use the same format what we use to override core Magento files into our theme.

Under your theme folder, Create a directory with name Package_Module. So, in your case, Please create a directory named Mageplaza_SocialLogin

Put the files following the same path what the base module have and paste the template files under the template directory. It will look like following:


Please refresh cache to get the changes.

  • where do you get the module name? The path says "mageplaza\magento-2-social-login" not "Mageplaza_SocialLogin". Did you get that from somewhere else?
    – Guerrilla
    Jun 22 '17 at 10:40
  • mageplaza is your Package name, magento-2-social-login in your module name. while overriding the files to our theme, you have to follow this standard, use camel case format. So it will change to Mageplaza_SocialLogin. I took reference from github. github.com/mageplaza/magento-2-social-login/blob/master/… Jun 22 '17 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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