1

I was woundering if any could help me find a way to set the Meta description for the customer/account/login page?

Cant find an xml file where I can change it and not sure how to do it in the login.phtml file.

1
  • Let us know which version of Magento you're using.
    – nikola99
    Commented Jun 21, 2017 at 23:27

2 Answers 2

0

Add code in the below xml file:

/app/design/frontend/base/default/layout/customer.xml

find following code arround line no. 84 : <customer_account_login translate="label">

add below code in this block:

<reference name="head">
    <action method="setTitle" translate="title" module="customer"><title>YOUR META TITLE HERE</title></action>
    <action method="setDescription" translate="description" module="customer"><description>YOUR META DESCRIPTION HERE</description></action>
    <action method="setKeywords" translate="keywords" module="customer"><keywords>YOUR META KEYWORDS HERE</keywords></action>
</reference>

After add your code it will display like below:

<customer_account_login translate="label">
    <label>Customer Account Login Form</label>
    <!-- Mage_Customer -->
    <remove name="right"/>
    <remove name="left"/>
    
    <reference name="head">
        <action method="setTitle" translate="title" module="customer"><title>YOUR META TITLE HERE</title></action>
        <action method="setDescription" translate="description" module="customer"><description>YOUR META DESCRIPTION HERE</description></action>
        <action method="setKeywords" translate="keywords" module="customer"><keywords>YOUR META KEYWORDS HERE</keywords></action>
    </reference>

    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
    </reference>
</customer_account_login>
0

Create customer_account_login.xml layout file in to your theme or extension. app/design/frontend/Vendor/Theme/Magento_Customer/layout/customer_account_login.xml

Add below code in created file.

<head>
 <meta name="description" content="Add description here"/>
</head> 

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.